|
saplingg Novice
Joined: 06 Oct 2005 Posts: 31
|
Posted: Thu Oct 06, 2005 11:22 am
Help With Buttons! |
Now I'm very new to buttons so this should be pretty simple but essentially I want to create a "display button".
I just want the (numerical) value of one of my variables to be displayed on it, and everytime the variable changes, the change is reflected in the button. Could somebody please show me how to do this?
For example's sake, could you use the variable "@red" and "RED" as the button name and colour and everything.
Thank you.
Also, my variable @red is in a class folder called "Gambling", so if there is any need for that information then please do include where necessary :) |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Oct 06, 2005 1:45 pm |
I'm thinking all you want is a gauge.
It's LIKE a button but with no real functions (drop down menus, actions etc)
see how this works for ya
#BUTTON 15 {@red} {} {} {} {} {} {} {Size} {69} {23} {} {} {} {} {} {Gauge||12|||12} {} "TESTING" {Explore|Inset} {} {} |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Oct 06, 2005 1:55 pm |
A basic button should do you fine.
Code: |
#BUTTON test {Test - @red} |
The first parameter is the Button ID, the next is the Caption which can have plain text, variables and predefine variables like %char
You can then use zMud to edit all the button attributes or alternatively you can use a full button specification to include size, but I think you're better off changing that in zMud.
Code: |
#BUTTON test{Test - @red} {} {} {} {} {} {} {Size} {69} {20} {} {} {} {} {} {} {} "" {} {} {} |
This includes the size specification as well. You can click here for more info on the #BUTTON command. |
|
_________________ Asati di tempari! |
|
|
|
saplingg Novice
Joined: 06 Oct 2005 Posts: 31
|
Posted: Thu Oct 06, 2005 3:01 pm |
I couldn't get either of those to work for me :(
|
|
|
|
Slaem Apprentice
Joined: 20 Sep 2005 Posts: 135
|
Posted: Thu Oct 06, 2005 5:56 pm |
I prefer to use the Settings toolbar to make buttons. From your settings window
Select New Button.
Put @red in the Caption.
Save.
You now have a button that will display the value of @red.
To name it, select the Advanced tab for the button.
Put "red" in the ID field.
You should be able to fiddle with the rest of the features to set them to your liking.
The command for this would be:
#BUTTON 1 "@red" {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {Explore|Inset} {} {red}
(zMud shows the button script as {@red} but it expands the variable in this format leaving only the value. Using the settings menu is easier) |
|
|
|
|
|