Toggle States / Toggle Buttons

Got an idea, post it here

Postby C-moi on Wed Apr 05, 2006 4:06 pm

Thank you m_masta !
C-moi
 
Posts: 164
Joined: Fri Apr 23, 2004 6:58 am
Location: France

Postby JSL on Thu Apr 06, 2006 7:27 pm

The toggle feature is fantastic. However, I am not sure how to use it with my IR-remote control (USBUIRT). All my remote control buttons are connected to events (using the very powerful xremote plugin by badubo) and not xlobby buttons. Hence, using my remote will not enable the toggle feature.

To give an example: If you have a simple on/off button calling an "off-event" and an "on-event", I will only be able to trigger either the "off-event" or the "on-event" with my remote control (using one button).

Have I complete overlooked something here?

jsl
JSL
 
Posts: 31
Joined: Thu Dec 30, 2004 11:22 am

Postby Colby on Thu Apr 13, 2006 3:09 am

My skin now has toggles through out it. Thats all fine and dandy, one of the things I noticed was button id's are case sensative. So set button state ID=OFF is different then ID=off. That caused me problems when making toggles. It all works now that I know that.

Steven, It would be nice if there was am event called set button toggles to default and would set all buttons to default state. I had to create 6 events to turn all buttons on one page back to default.
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby sharp_1 on Thu Apr 13, 2006 4:45 am

Whoo-Hooo!! I got the toggles to work thanks to Colby's new release. This works great!!! Thanks Steven and Colby for all the help.
sharp_1
 
Posts: 630
Joined: Tue Jan 31, 2006 1:01 am
Location: Wisconsin

Postby S Pittaway on Thu Apr 13, 2006 9:13 am

can you get the state of a button from inside a plugin?
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby art on Sat Apr 15, 2006 2:58 am

The toggle feature is fantastic. However, I am not sure how to use it with my IR-remote control (USBUIRT). All my remote control buttons are connected to events (using the very powerful xremote plugin by badubo) and not xlobby buttons. Hence, using my remote will not enable the toggle feature.

To give an example: If you have a simple on/off button calling an "off-event" and an "on-event", I will only be able to trigger either the "off-event" or the "on-event" with my remote control (using one button).

Have I complete overlooked something here?

jsl


JSL,
Were you able to figure this out?
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby JSL on Sat Apr 15, 2006 8:15 pm

JSL, Were you able to figure this out?


No I can't figure out a simple solution (I guess you can do something with the help of Girder).

As I see it, we need an execution command like the one we have for categories, that will execute the event assigned to the always current selected state, e.g. button>execute, buttonid: [buttonid]. This will enhance the toggle functionality in several areas:

i) when we use a remote, we can have the remote trigger an event with a Change Button State command and the Execution command (this I think will solve the current remote control shortcoming)

ii) today you can change the state of one button (buttonA) pressing another button (buttonB) (via an event). However, you cannot activate the event on buttonA via buttonB, you will need to press buttonA "manually" anyhow. The execution command will help on this as well.

I furthermore think we need a variable that returns the current state of a button (I don't think we have that now). In this way we can have external programs/batch files and the like act upon the state of a button (e.g. based on/off states).

I have encounter a couple of minor bugs:

1) I can't get the state functionality to work in overlays

2) You can choose to have a state as Default (for when xlobby loads). If you don't select any state as default xlobby should (as I understand it) load the states on which is was exited last time (smart as it will avoid xlobby go out of sync with external applications and hardware). However, if I have a button with three states or more, and no default is selected, the buttons will not work on restart. I need to enter the Setup menu and at least select each button for it to work again.

I think the toggle functionality is a very nice “little” feature with a lot of new impact for skinners.

Jsl
JSL
 
Posts: 31
Joined: Thu Dec 30, 2004 11:22 am

Postby art on Sat Apr 15, 2006 11:22 pm

I was playing around with this problem and I got a solution (not pretty :roll: but it works for me) using Xremote plugin. Here is what I did:
I created an event (lets call it "IRon-off"), I've added command to it XRemote>execute>%variable>IRexec%. To my "ON" event I've added command Xlobby>save to variable>Information=buttonOFF>Variable=IRexec and to "OFF" event Xlobby>save to variable>Information=buttonON>Variable=IRexec. Here I had to restart Xlobby, so XRemote could reload events. Next in XRemote I created 2 buttons: "buttonON" with event "ON" and "buttonOFF" with event "OFF". And last thing is to assign ir trigger to the "IRon-off" event.
The only problem with this is that variable IRexec is empty when you restart xlobby, so I guess I'll just have to create another event that will assign the value to it on startup....

Like I said it's not a pretty solution, but ...
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby JSL on Sun Apr 16, 2006 8:54 am

Hey art - nice thinking... :)

As I see it, we need an execution command like the one we have for categories, that will execute the event assigned to the always current selected state


After more "research" I see that we have this feature somewhat already. Combine the Button Select command (where the variable is a buttonID) and the Enter command (found under the Navigation section). This will work as if you "manually" pressed the button.

So put the two commands in an event (e.g. call it PressButton) and let the PressButton event be triggered by your remote control (e.g. via XRemote). It works fine and the events asigned to the button's stages are activated as expected.

JSL
JSL
 
Posts: 31
Joined: Thu Dec 30, 2004 11:22 am

Postby art on Sun Apr 16, 2006 1:54 pm

After more "research" I see that we have this feature somewhat already. Combine the Button Select command (where the variable is a buttonID) and the Enter command (found under the Navigation section). This will work as if you "manually" pressed the button.


Yes, I did that too, but you have to be on the page where given button is and I didn't want to copy this one button to every page.

As I see it, we need an execution command like the one we have for categories, that will execute the event assigned to the always current selected state


I still think we need something like this.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Strange Toggle Behavior

Postby PhilB on Tue Jun 06, 2006 11:08 pm

I got Toggles somewhat working but am seeing some odd things. I have a screen for each zone that allows the volume to be set in increments of 10. To test my understanding of toggles, I set up one button (20) to have 2 states...on and off. On is assigned a green color and off is assigned red.

I also want to toggle 20 to off when I press the zone off button.

Here is the strange part.

I set up the Zone Off event and test it in the skin editor. It works fine. If I test the event in the Skin, it does not toggle. There are other examples of this "works in the editor test but not the skin itself.

Anybody run into this?

version is Tuesday June 6, 2006.
PhilB
 
Posts: 283
Joined: Sat Feb 18, 2006 6:38 pm

Postby foolio on Tue Aug 29, 2006 10:54 pm

can the state of an icon be set by a variable from another plugin?

ie, I'm using the elk plugin which will let me know if a zone is open - how could i tie that variable to a state button toggle?
foolio
 
Posts: 21
Joined: Mon Aug 28, 2006 8:02 pm

Postby Jay on Wed Nov 08, 2006 5:15 pm

I came upon this thread while searching for a way to see whether a XL-launched program was running or not by looking at the state of a launch/kill process (toggled) event button.

I saw some links to example skins but they're 404 now.

Was this ever implemented in XL? If so, where?

TIA
Jay
 
Posts: 869
Joined: Thu Oct 13, 2005 6:28 pm
Location: Kiawah Island, SC US

Previous