|
makena Apprentice
Joined: 11 Aug 2006 Posts: 100
|
Posted: 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.
p.s. are custom button images working in CMUD? or multicolored text on buttons? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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! |
|
|
|
makena Apprentice
Joined: 11 Aug 2006 Posts: 100
|
Posted: 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.. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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 :)
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: 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 |
|
|
|
|
|