TheOfficialStinger Posted July 30, 2013 Share Posted July 30, 2013 Hello, all! I'm just wondering how i would go about creating a simple GUI box in-game that has a text box and a button on it when a player presses a key?There's some Clydes in it for you if you help! ;D Link to comment Share on other sites More sharing options...
7Roses Posted July 30, 2013 Share Posted July 30, 2013 haven't been doing anything with the gui's yet, but have you already looked at the /media/lua/ISUI/... files? those are the files that defines the 'classes'.if you have seen those and know how they work. you should be a little bit closer to the answer(sorry for the not to the point answer, but I've not enought time at the moment to look into the problem, I will take a better look tomorrow ) Link to comment Share on other sites More sharing options...
kinyoshi Posted July 31, 2013 Share Posted July 31, 2013 haven't been doing anything with the gui's yet, but have you already looked at the /media/lua/ISUI/... files? those are the files that defines the 'classes'.if you have seen those and know how they work. you should be a little bit closer to the answer(sorry for the not to the point answer, but I've not enought time at the moment to look into the problem, I will take a better look tomorrow ) Ditto. I apologize for not being much help as I am scared to learn lua. I stick to the items and recipes scripting. Link to comment Share on other sites More sharing options...
RoboMat Posted July 31, 2013 Share Posted July 31, 2013 Hello, all! I'm just wondering how i would go about creating a simple GUI box in-game that has a text box and a button on it when a player presses a key?There's some Clydes in it for you if you help! ;D Use this: -- RoboMat local modal = nil; local posX = 0; local posY = 0; local width = 230; local height = 120; local text = "This is a modal"; local useYesNo = true; local toDoWhenClicked = MyFunction.toExecute; modal = ISModalDialog:new(posX, posY, width, height, text, useYesNo, nil, toDoWhenClicked); modal:initialise(); modal:addToUIManager(); useYesNo determines wether the modal shows just an ok button (then you don't need the onClicked function) or if it shows yes or no. I'm not sure about the key presses though. I'd say you could test if the window is on screen and if a certain key is pressed. Link to comment Share on other sites More sharing options...
TheOfficialStinger Posted July 31, 2013 Author Share Posted July 31, 2013 Thank you all very much!Here are your clydes: If i could trouble your great minds once more...Now that i have my example panel, how do i go about adding, manipulating, and getting data from a text box when the player presses a button? More important than that, how do i tell them what happened when they sent the text? Link to comment Share on other sites More sharing options...
RoboMat Posted July 31, 2013 Share Posted July 31, 2013 Well the ISModalDialog isn't designed for a task like that. Afaik there is nothing like this in the game at the moment, but of course you could write it yourself. Link to comment Share on other sites More sharing options...
TheOfficialStinger Posted August 2, 2013 Author Share Posted August 2, 2013 Ok, Thank you again for all your help! Link to comment Share on other sites More sharing options...
Aricane Posted August 2, 2013 Share Posted August 2, 2013 Man that's a lot of clydes. Link to comment Share on other sites More sharing options...
TheOfficialStinger Posted August 3, 2013 Author Share Posted August 3, 2013 Hey, they were a lot of help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now