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
makena
Apprentice


Joined: 11 Aug 2006
Posts: 100

PostPosted: Tue Jan 16, 2007 5:33 am   

I'ma button n00b
 
Excuse my ignorance on the subject but I have questions about buttons..

Right now I can basically make them display/do what I want (a few basic gauges and push buttons).

I would like to make more complex buttons.. like..

A button that would say "XXX" when a vars value is x
or would say "YYY (xyz)" when a vars value is y
etc...

I CAN do this to a limited extent with a long button name consisting of %ifs, %iskey, %member, etc... this seems hard to edit/control and kinda kludged

Am I missing something obvious?
I have not EVER used any button states, menu or multistate buttons..
I missing something obvious, I'm sure of it. Embarassed

p.s. are custom button images working in CMUD? or multicolored text on buttons?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Jan 16, 2007 6:16 am   
 
There are several things it sounds like you want to do. I would suggest you post more specific examples of what you like help with. Until then you can use the #BUTTON and #GAUGE documentation to help you understand things better. You should use the package editor to create your buttons.
_________________
Asati di tempari!
Reply with quote
makena
Apprentice


Joined: 11 Aug 2006
Posts: 100

PostPosted: Tue Jan 16, 2007 6:44 am   
 
Thanks for the quick response. I only have used the package editor to create the buttons I currently have.
There is nothing really I cannot do, as I posted above. I just wondered it I was reinventing the wheel..

Here is an example of one button..
just a separator
nothing in any of the other boxes but the "name" box

%if(%iskey(@Tomspells,might),Might~(@Tomspells.might~),NO MIGHT)

Not bad, pretty quick and easy, but I have some that are much longer..
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Jan 16, 2007 9:41 am   
 
%if is only way to do conditional button labels that update themselves that I know of. It works, I shan't complain :)
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Jan 16, 2007 3:03 pm   
 
You want a multi-state button with the button state controlled by a variable. Each state can have a different name and, a different command associated with it.

I don't know if multi-state buttons work this way in cMud yet but if you search the beta forum for my bug reports on buttons I posted a large amount on how it should work and be done with a toggle button. Toggle buttons DO work properly now and if you only have two words you want displayed a toggle is exactly what you want.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
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