Toggle States / Toggle Buttons

Got an idea, post it here

Toggle States / Toggle Buttons

Postby stevenhanna6 on Tue Mar 28, 2006 7:44 am

I'm in the process of adding the ability to have toggled buttons, this is just here to keep you guys up to date. Instead of messin up colbys top 50 thread.

If you want to see how this will be setup, its very simple

http://www.xlobby.com/xlobby2.zip

1. In the "image" section you will be able to assign each toggle state a different image.

2. In the "event" section you will actually add and remove states, and select which state you wish to edit...each state will have its own click/enter/exit events.

New commands to be added

Set Next State
Set State (int togglestate)
Set State (string buttonid, string int togglestate)

This is not done yet, work in progress. Set State by button id will allow for the ability to do radio button groups....you could have a command that switches the states of a bunch of other buttons to "1" lets say...which would be off. Lots of possibilities here. Just showing this should satisfy everyone.
stevenhanna6
 
Posts: 904
Joined: Tue Feb 18, 2003 10:39 am
Location: Ontario, Canada

Postby Twit on Tue Mar 28, 2006 5:30 pm

TX - U Da Man!
Twit
 
Posts: 258
Joined: Thu Nov 20, 2003 4:14 am
Location: South Africa

Postby PhilB on Tue Mar 28, 2006 6:53 pm

We all have been waiting for this feature to be added for a long time. I appreciate Steven focusing on what the majority of the user community wants first.

I recommend everyone who has requested this feature send Steven a fresh donation once he releases the new feature.

Thanks Steven.
PB
PhilB
 
Posts: 283
Joined: Sat Feb 18, 2006 6:38 pm

Postby rika on Tue Mar 28, 2006 8:39 pm

Yes!
Thanks

Rika
rika
 
Posts: 401
Joined: Fri Apr 02, 2004 5:43 am
Location: Sweden

Re: Toggle States / Toggle Buttons

Postby Colby on Tue Mar 28, 2006 10:59 pm

stevenhanna6 wrote:... Instead of messin up colbys top 50 thread...

Are you making fun of me?

Thanks Steven will give it a look.
Last edited by Colby on Tue Mar 28, 2006 11:00 pm, edited 1 time in total.
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby sharp_1 on Tue Mar 28, 2006 10:59 pm

Yes!! Yes!! Yes!!...that's the ticket!!! Looks like even I will be able to figure it out.
sharp_1
 
Posts: 630
Joined: Tue Jan 31, 2006 1:01 am
Location: Wisconsin

Postby stevenhanna6 on Fri Mar 31, 2006 1:48 am

Ok here we go, I've tried to think of everything and run through all the possible bugs with this new feature but adding something this complex might mess something up I didnt think of. Try it ou here

http://www.xlobby.com/xlobby2.zip

I ended up giving states a name...I figured that made more sense in the end. Make sure you give your button a buttonid if you want to control its state through the new events

xlobby->button state set
xlobby->button state next
xlobby->button state prev

ummm what else...there is also a check box called "default" this will be the default state when xlobby is loaded....also be careful when you change the state of a button in the skin editor it will remain in that state when you exit....so as of now it doesnt save/restore the current state...you'll just have to watch that because it is useful to set the state manually through the skin editor for testing. You can also pass %% variables to the new events as one would expect.

I think I covered everything. Questions comments feedback welcom as always.


Are you making fun of me?


no no I was serious that thread would get out of control if we keep everything on there. I'll make a new thread for each one I decide to do.
stevenhanna6
 
Posts: 904
Joined: Tue Feb 18, 2003 10:39 am
Location: Ontario, Canada

Postby Colby on Fri Mar 31, 2006 4:00 am

I think I covered everything.

A nice write up on how to actually use this new stuff would be nice. I am a bit confused by the order and process of making my new toggle. Why do I get crash if I make toggle in an incorrect sequence? How would I rename my states? What all can this do? I would like examples or a walk through.

Thanks Again
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby Colby on Sat Apr 01, 2006 11:30 pm

I cant get the command, set state to work. I assume I am doing it correct.

My toggle button has ID
It has 2 named states
different images per state
my set state event is on another button, mapped to the toggle's ID and naming 1 of the 2 named states
Pressing this button wont change the toggle
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby sharp_1 on Mon Apr 03, 2006 3:12 am

Diddo!!! I'm having a tough time with this too.
sharp_1
 
Posts: 630
Joined: Tue Jan 31, 2006 1:01 am
Location: Wisconsin

Postby Colby on Tue Apr 04, 2006 1:38 am

Yep confirmed in 2 different skins and instances you cant toggle buttons. The ID doesnt work for other buttons. If I have 2 buttons on a page one ID=A and the other ID=B, each has 2 toggle states On/Off. set up binary 2. I want to click A and goto binary 1. Click B and goto binary 2. Hince the term toggle.

10
01

I thought that I could add set state with B's ID on the event of the up state of the A. It does not work. You can only set state for the button on which the event is on.
__________________________________

Another thing, the images I want to use are button and button-enter for my toggle. Appearently you cant use enter and down images as toggle states. 1. You cant assign the states from preview as images for the states and 2. button-enter or button-down are not listed in the images bank. I am going to have a ton of duplicate images in my skin if we cant recycle the buttons.
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby stevenhanna6 on Tue Apr 04, 2006 2:13 am

Ok here you go guys how toggle buttons work

http://www.xlobby.com/forum/viewtopic.php?p=27129
stevenhanna6
 
Posts: 904
Joined: Tue Feb 18, 2003 10:39 am
Location: Ontario, Canada

Postby Colby on Tue Apr 04, 2006 2:31 am

I read your document, I figured most of that out already. It didnt answer my questions. The problem is when there are multiple IDs not same. And the image thing I mentioned. Nice long write up, so uncharacteristic. :)
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA

Postby stevenhanna6 on Tue Apr 04, 2006 3:20 am

buttons dont have to have the same id as in the example, they can have different button ids...but you will have to target each one individually to change its state of that button through an event. That event can be triggered from any button, so you can change the state of any button regardless if a button has events or not. Not sure that answers the question, the "binary" stuff is messing me up. But if you want A to go to another sate just asssign its click event a "button state set" command. Likewise with B, or if you want A to control B then just set the ids differently. Or if you want them in synch they will need an event with 2 commands since the button ids are different.

Them image thing I understand, but one of the original ideas from a thread I read was that someone wanted to have a completely different button for a togglestate...instead of using "down" to show which state its in...obviously with multiple toggle states a normal 3 image button wont cut it. Maybe I could add a check box to use the same button in the case of a binary or double toggle state...in that case it would use "down" to show the state.
stevenhanna6
 
Posts: 904
Joined: Tue Feb 18, 2003 10:39 am
Location: Ontario, Canada

Postby m_masta on Tue Apr 04, 2006 5:11 am

Works good over here.
I was able to implement a simple play/pause combo button.
The button will show a "pause" button, when music is playing, and if I click on itself, the music will pause and show me a "play" button. I also control this button so it goes back to "play" state, when I press a stop button.
It was a little tricky, but I think I got it.

Thanks Steve.
m_masta
 
Posts: 125
Joined: Fri Mar 11, 2005 5:41 am
Location: Houston, TX

Next