Ok so basically I've gotten down a few basics of interface managing but one i can't figure out is how do I make like a creation screen and have a button with submit submit all the inputted data?
http://i.imgur.com/yCqpz.png?1
^ as a example
how would I get it to submit the picked village maybe hair picked eye color name maybe if i added in biography or age or other pointless things how do i get it to submit it and have the character on the map have all this
Jul 28 2013, 8:30 am
|
|
You could use winget().
|
i see but i honestly have no clue how id inject that into vars would i make it a proc or something i need kinda a simple demo code
|
winget returns values of text which you can assign as vars.
usr << "mainwindow.is-visible = [winget(usr, "mainwindow", "is-visible")]" |
so would
mob/var/ name= winget(usr,"namelabel",?) im not able to follow the demo code to well but would makign the var equal the winget for the label or w/e work in regards to its value? |
Yes. and that ? has to be a parameter, you can see all the parameters in the interface guide.
|
yeh i tried it it doesnt work just gives me errors
mob |
In response to Mastergamerx
|
|
You cannot perform operations when declaring or defining a variable. It has to be a static assignment like a number, or a text string. Something that cannot change.
In order to perform an operation like that, you must do it within the bounds of something that's happening at -runtime-. As for this, say you have the screen up, and you set the submit button's command to this... mob/verb/submitCharacter() You should get the results you're looking for. |
how would i do it for buttons woudl i have to make a separate verb for each button to set a stat or is there a way for me to make the button submit a value based on it name or sumthing when i click it
|
You should make it so each button updates it's relating value visually, it would be a waste for it to update the whole screen.
|