User avatar
maik
Senior Member
Senior Member
Posts: 206
Joined: Sat Mar 10, 2007 12:46 pm
Location: North Bay, Ontario, Canada
Contact: Send private message

Transparency or color from variable

Sat May 14, 2011 9:30 am

Is it possible to make a button color or transparency change according to a variable value? And change on any changes to the variable and not just on startup?

Maik

User avatar
maik
Senior Member
Senior Member
Posts: 206
Joined: Sat Mar 10, 2007 12:46 pm
Location: North Bay, Ontario, Canada
Contact: Send private message

Re: Transparency or color from variable

Mon May 16, 2011 8:25 pm

Nothing?

Maik

shakey
Intermediate
Intermediate
Posts: 322
Joined: Sat Jun 28, 2008 10:55 pm
Contact: Send private message

Re: Transparency or color from variable

Mon May 16, 2011 9:30 pm

You can change the color and transparency depending on the state. Open the scene in the editor place your variable in button Label field. Then click on the states button on the left side and set the color and transparency for the on and off state.

Sorry if this isn't clear I know just enough to be dangerous. If I remember their is a section in the wiki on doing this.

Shakey

User avatar
AllonisDave
Founder
Founder
Posts: 11604
Joined: Fri Feb 07, 2003 8:56 am
Location: Newport Beach, CA
Contact: Send private message

Re: Transparency or color from variable

Tue May 17, 2011 10:23 am

That is what lies under the "states" button when you are in edit mode. Place the server variable that you want to use as the control in the label field. Click on the "Hide Value" check box then go into states and set the color and transparency you need for the off and on states. If your server variable is not of the "off, on" variety you can define a custom "local off" value that will act as the off state. This should do what you want.

User avatar
maik
Senior Member
Senior Member
Posts: 206
Joined: Sat Mar 10, 2007 12:46 pm
Location: North Bay, Ontario, Canada
Contact: Send private message

Re: Transparency or color from variable

Wed May 18, 2011 5:26 am

Local off is great but I can not use 40 or 60% from mllighting variable? So if a light is on at 63% the icon will be 63% lid up?

Maik

mcascio

Re: Transparency or color from variable

Wed May 18, 2011 11:03 am

You could make a rule that checks when the variable value changes within the range you want. Then create a second variable that sets a value to on or off within that rule.
Then put that second variable in your buttons label field.

Return to “MLS files/Buttons/Icons/Backgrounds/SWF/3rd Party Apps/Device Files”

Who is online

Users browsing this forum: No registered users and 1 guest