Light On/Off button highlight?

Forum to ask for any help
Post Reply
anderdea
Posts: 51
Joined: Wed Mar 07, 2018 1:19 am

Light On/Off button highlight?

Post by anderdea » Mon Apr 09, 2018 1:06 am

What is the best way to do this. I’m assuming with flags but not clear on the process.
I have X10 IR controlled lights in my project. I want to add a direct ON button and a Direct OFF button. The ON light button is Yellow and the OFF light button is grayish. I want to stack them and have the yellow button appear when the light and that button is pressed for ON and then the grayish button to show when the next press turns the light off. No feedback here, just two buttons showing visually the two stages. Can this be done?

User avatar
DemoPad
Site Admin
Posts: 703
Joined: Thu Jun 14, 2012 10:46 am
Contact:

Re: Light On/Off button highlight?

Post by DemoPad » Mon Apr 09, 2018 9:48 am

You can do it with a single button / flag.

use the highlight image menu, and choose an alternate image for the button, which is set when the flag is on using the highlight image flag option.

Each time you press the button, toggle the flag, which will alter the button image back and forth, and have your actions dependent on the flag status:

Button actions:
Toggle Flag (which will change the image)
Send lights ON command dependent on flag being ON
Send lights OFF command dependent on flag being OFF

anderdea
Posts: 51
Joined: Wed Mar 07, 2018 1:19 am

Re: Light On/Off button highlight?

Post by anderdea » Mon Apr 09, 2018 10:23 pm

Got it to work, thanks.

Post Reply