Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Fluffy
Newbie


Joined: 06 Jan 2008
Posts: 8
Location: Houston, TX

PostPosted: Wed Jan 16, 2008 3:23 pm   

Multi-State Buttons - Changing text?
 
Actually kind of a two part question, but all of it is in regards to Multi-State buttons!

When creating a multi-state button, I go to settings, and then select New -> Button from the menu, then select multistate from the drop down menu. Where do I set how many 'Menu Items' there will be? The only way I found out how to set them, was.. I created one (by clicking on the button in the editor) and it created a sub-item of the menu object, which I edited, then went to the main button and edited the xml. I was wanting to know how to add more menu choices without editing the XML directly.

The REAL issue (because if need be, i can edit the xml), is how do I make it change the Text thats displayed on the menu when I select another menu choice? Example:

Area List
--
The Swamp
Forest
Mountain 'n Stuff
Candy Mountain

ok.. so 'Area List' is whats displayed, and when I select 'Candy Mountain'.. well 'Area List' is still displayed. I know that I can change the color of the button itself upon selecting different options. Just, trying to change the text to what I selected isn't working. :(

Thanks in advance! :)
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Jan 16, 2008 3:26 pm   
 
You could do this in a more general way by just using a variable as the button text, then update the variable to change what is shown on the button.

To change the text on a multi-state button, though, you assign a button variable (which is different from using a variable as the button text, mind you) and change that variable to the number of the state you want to be the active state.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Jan 16, 2008 3:38 pm   
 
Also, you create more states for the button by clicking New... Button State with the multistate button highlighted. Each state is a single menu option.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Fluffy
Newbie


Joined: 06 Jan 2008
Posts: 8
Location: Houston, TX

PostPosted: Wed Jan 16, 2008 3:59 pm   
 
Hah, thats awesome. I got it guys, Thank you very much!!! :)
Reply with quote
Fluffy
Newbie


Joined: 06 Jan 2008
Posts: 8
Location: Houston, TX

PostPosted: Wed Jan 16, 2008 5:56 pm   
 
I was wondering is there a way to get the currently selected menu item's Caption?

Mostly for debugging, and a bit of information on what is going on with the script.. so they select from the drop down menu, and then it says 'Selected area: Academy' or something like that.

Or would I need to set an additional variable with the name? o.O

Thanks!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net