Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
shazara
Beginner


Joined: 17 Feb 2003
Posts: 16
Location: USA

PostPosted: Wed Apr 13, 2005 11:46 am   

Btncol for Toggle button
 
Toggle buttons!

Is there a way to change the background and foreground colors of both the ON state and the OFF state in one command?
Reply with quote
Private
Adept


Joined: 10 Jan 2002
Posts: 264
Location: USA

PostPosted: Wed Apr 13, 2005 2:06 pm   
 
#BUTTON button {off} {#show Button ON} {on} {#show Button OFF} {} {1} {} {} {} {} {} {} {} {76} {34} {} {} "" {} {} {}

This will create a button that says "off" in red on a dark red background,
when clicked it will SHOW Button on, and chand to saying "on" in green
with a dark green background. (76 and 34 colorcodes)

if you wanted to change an already defined button... there isnt a pretty way i know of, but you could do the following on this example button...

#UNBUTTON button

then

#BUTTON button {off} {#show Button ON} {on} {#show Button OFF} {} {1} {} {} {} {} {} {} {} {110} {25} {} {} "" {} {} {button}

to re-add it as a yellow and blue (110 and 25 colorcodes) button... it flickers the window a bit, but works.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Apr 14, 2005 3:58 am   
 
No, other than what Private did there's no way to color more than one state of a button with just one command. However, if you store your color in a variable and then use the variable to color the button you really only need one command in both states to maintain the color you want in each.

#call %btncol(name, @backcol, @forecol)

The assignation of the variables would occur in whatever trigger/alias/etc you wanted to mark the event.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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