|
craigbb Newbie
Joined: 02 Apr 2009 Posts: 7
|
Posted: Tue Apr 21, 2009 5:39 am
Button question |
I was playing with the buttons in 3.06 and just noticed a small thing. When using a "Toggle" button you do not have the option of changing the font color when the button is pushed in. So if you want a button transparent when it's not active but lets say have it GREEN when it's pushed in and you want yellow font color to make it easier to read, you cannot change just the color when it's pushed in. I went back and checked and it's the same in 3.05.
Not really a bug and no real show stopper just thought I would mention it and see if anyone else has noticed this. *smile* |
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Tue Apr 21, 2009 8:37 am |
CMUD was never able to change text color for other button states and this is on to-do list (I hope it so). You may use %btncol function if you want to change text color.
|
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Apr 21, 2009 11:15 am |
You could put the %btncol function directly into the caption of the button. My tactic for doing this is to enclose it in an %if so that no text is produced. This is good when the caption is not dynamic in any other way. For example:
%if(%btncol(id,green),,)
When other parts of the caption change based on variables then the color change should be placed in the script section:
#CALL %btncol(id,yellow) |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
craigbb Newbie
Joined: 02 Apr 2009 Posts: 7
|
Posted: Thu Apr 23, 2009 7:43 am |
Even if you use the %btncol command if you choose a toggle btn the command changes the color for both states not just the "On" or "Off" state. Perhaps I am not descibing what I would like to do so I'll try it this way...
I like the way the Default buttons look so I want to create a Toggle button that says for example "Test Off" like this;
However when it is pushed in I would like to color the button let's say green so no prob I just set the Button Color when it is pushed in to green like this;
But my old eyes don't work so well so it would be much easier if the font color of the "On" state would look like this;
Sadly though, no matter how I change the Font color to yellow (even manually with %btncol) it changes the color of the "Off" state as well so now it looks like this;
So the only thing left to do is to change the Button Color when it's "Off" to let's say red like this;
But of course I lose the Default look.
Does that help explain it better?
(And BTW no comments about changing my old peepers hehehe sorry I cannot afford that hardware upgrade) |
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Thu Apr 23, 2009 11:19 am |
craigbb,
zMUD still offers easier control on button text color than CMUD, unfortunately.
You should call %btncol in both scripts, for OFF state and for ON state. That's why I personally dislike %btncol function: if you've decided to mess with it, CMUD will forget about defaults and you'll script all color changes manually.
So... Put #CALL %btncol(id,,yellow) in the script for ON state and #CALL %btncol(id,,black) for OFF state. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Apr 23, 2009 5:10 pm |
Currently buttons in CMUD only have a *single* text color. Only the background color can be different for different states. In zMUD, the state color was stored as an ANSI attribute value, which allowed you to set both the foreground and background colors, but restricted you to the 16 ANSI colors. In CMUD you can use *any* color for the button state, but it only sets the background color. Allowing the text color to be changed is on the to-do list for the future.
|
|
|
|
craigbb Newbie
Joined: 02 Apr 2009 Posts: 7
|
Posted: Fri Apr 24, 2009 3:43 am |
Thanks Zugg
|
|
|
|
|
|