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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
parwartter
Newbie


Joined: 07 Nov 2004
Posts: 2

PostPosted: Sun Nov 07, 2004 8:03 pm   

Problem with multistate buttons
 
I know how to make multistate buttons and they even work, but now i want something more advanced, i try to explain:

Lets say i have a multistate button of this sort:
Main Caption
Caption: My own button
Value: nothing

State1
Caption: "S1-caption"
Value: Do_trick_1

State2
Caption: "S2-caption"
value: Do_trick_2

.. and so on.

Now, i want this multistate button to this kind of trick: When i press the button and choose "State1" (whichs reads "S1-caption"), it does the Do_trick_1 AND changes the "State1"'s caption to "S1-othercaption"). When i choose the "State1" again (which now has a caption "S1-othercaption"), it does Do_different_trick_1 and changes the caption of "State1"'s back to "S1-caption". And if i now press the "State1" it does the original Do_trick_1 and again changes it's caption to "S1-othercaption" and so on. So i actually want to have a toggle-button inside multistate-button.

I know that to do this trick i need to use variables and #if - function to do the do_trick_1 and do_different_trick_1. The problem is that i dont know how to change the caption-text inside the multistate-button. In this case the "S1-caption" to "S1-othercaption"

I know the explanation isnt the clearest possible, but try to understand :)

Thanks.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Nov 08, 2004 1:30 am   
 
You can use the %if function in captions for buttons. Between that and #IF in the commands section you should be able to handle it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
parwartter
Newbie


Joined: 07 Nov 2004
Posts: 2

PostPosted: Mon Nov 08, 2004 4:28 am   
 
I tried putting line %if(@variable = 1,"ON","OFF") into the caption field, but the result is that it shows the entire "if(@variable = 1,"ON","OFF")" as the caption, and no "ON" or "OFF" as it shoud.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Nov 08, 2004 11:16 am   
 
Grr. That was a bug in an older version, and I was sure Zugg fixed it. It seems he did not. Please post a bug report in the bug tracking system about it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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