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
easal
Novice


Joined: 21 Jun 2005
Posts: 38

PostPosted: Wed Jun 06, 2007 9:43 pm   

Multi state Buttons
 
I'm not sure if these are meant to be fully functioning or not, I've read things saying they are and that they aren't.

Basically I can't figure out how to get them working and the documentation isn't exactly verbose on the issue.

I make the button, add the states, assign dummy scripts just for testing and save.

What happens then varies. Sometimes they won't shift off the First caption. Sometimes it will but the first caption will dissapear. Sometimes the captions switch but the colours dont and so on...

All I want is a multistate to handling two variables @hunting and @huntleader. One option for neither, one for just hunting and one positive for both. I had been doing it with two toggle buttons which worked fine but am a bit frustrated that I can't seem to get this neater option to work.

Thanks in advance.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed Jun 06, 2007 10:00 pm   
 
I can't really say much about this except that it's working for me. The method I used was just to create a button, change the type to multistate, and fill in the script with "#var hunting 0;#var huntleader 0". I then created the three other states with New... Button State. Almost all the options, including button colour, worked just fine.

One thing I did notice is that the button caption never changed, but the colour did. I'm not sure if that's intentional.

And really, since you need four states anyway to emulate the behaviour of two buttons, I'm not sure I'd use this solution myself. I think two buttons would be more useful in that you wouldn't have to pfaff with a drop-down menu, you'd just click the button.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
easal
Novice


Joined: 21 Jun 2005
Posts: 38

PostPosted: Wed Jun 06, 2007 10:24 pm   
 
Only need three states since Huntleader is only needed when Hunting is on. Basically contains balance-triggers for picking up gold and corpses. Plus, if I got this to work, there were other multi state things I could have used it for. I play three characters with four different professions so I could have thing like #if @warden {tipslash @targ} #if @Mage {cast blast at @targ}}
And so on...

Ah well, we'll see if a clean install helps. Thanks!

edit: Half working now. The variables are being manipulated which is the important thing. The button doesn't change visually at all though. I can set the colour for the core state but changing the captions and colours for the other states yields no change when chosen.
*shrug* Pity, I tend to need visual prompts to keep track of things.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Jun 07, 2007 4:41 am   
 
There isn't any known bug with the multistate buttons in v1.33, so post more details on *exactly* how you are creating your button states. We need to know exactly what you are clicking on to help more with this.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Thu Jun 07, 2007 11:12 am   
 
The only problem I ever had with multi-state buttons in zMUD was that incoming text from my MUD would invalidate the button, causing my drop-down menu to do nothing at all when clicked. I haven't tried it in CMUD yet, but I expect that's been taken care of for the most part because buttons are only invalidated when really necessary now, right?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Jun 07, 2007 4:47 pm   
 
Yep, buttons are only invalidated when a variable in the button caption (or Variable field or expression) changes. Or, when you resize the screen or anything like that which would normally cause Windows to repaint something.
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