News:

SMF - Just Installed!

Main Menu

Ilumuinated Push button

Started by AndersG, December 07, 2011, 01:55:48 PM

Previous topic - Next topic

AndersG

Hello,

Is´t hard to make some  Ilumuinated Push button with 1 input when pressed and 1 output to get it to light. With coulor red, green, blue, yellow and white.

EasyPLC_Master

#1
I don't agree!.
I think is easy to create a iluminated push-button using the lighting properties of the objects.
You only must to add a code like this to enable the light emissive property that allows to set the amount of light emitted by the object.

if(IO.GetOutput("Light")) //example output use to activate the button light
{
   box[1].EmissiveColor = new Vector3(0.7f,0.7f,0.7f);
}
else
{
   box[1].EmissiveColor = Vector3.Zero;
}

Here I attach an example, then will be easier to understand.

[attachment deleted by admin]