Specialized buttons

Got an idea, post it here

Postby gamejester on Tue Dec 07, 2004 10:37 am

Good thinking hjackson, very creative, might have to give it a wirl if Steven does not implement toggles soon.

show/hide - like you say, these buttons are still navigatable so therefore still perform actions.

Girder - no you cannot tell girder to perform a button click, it can only call events directly, so would be no good with your rotating category.

Here is my take on a toggle (which I also am waiting with baited breath for), hang on I go into one here!
Implement it via events and keep buttons generic. How this would work.

1. you need to be able to assign events to events
2. you need a new event command xlobby:button graphic
3. you need a new behaviour for an event - cycle, which remembers the last state of an event.

Example:

1. create your discrete events
lights \ lights on
|_x10:light ON
|_xlobby:button graphic = lightOn.png
(this must be the name of a graphic that exists)

lights \ lights off
|_x10:light OFF
|_xlobby:button graphic = lightOff.png
(this must be the name of a graphic that exists)

2. Create your toggle (cycle) event
x10 \ Lights (at this layer tick the new tickbox cycle - this could be next to the multithread tickbox which would need to be unticked)
|_xlobby:event = general\lights on (this should present a tree view of events to pick, but display in standard format as seen in the XML)
|_xlobby:event = general\lights off

3. assign the event x10 \ lights to your graphic button in the skin editor

advantages:
1. buttons can have as many sates as you want and cycle through them
2. buttons can toggle
3. buttons are still simple
4. works from remote (grider)
5. events are now cleaner, special events can be set up once and then chained into other events when needed (they do not have to cycle)
example - when I open an overlay I hide 6 labels on 1 of my screens, currently I have to assign the same 6 commands to 4 events, if I could chain events I would group them all in 1 event then assign that event to each of the other 4 events that used that 'hide all' function.

You may also be able to achieve simple animation, if xlobbys multithread and wait actions are not too processor intensive, by making the cycle event cycle until it reached an xlobby:stop event.

Example – an event calls itself and changes the graphics on a button with a 1 second wait between cycles.

Stop event - would have to be introduced in all regualr toggle buttons between actions, or it would just toggle for ever!

Disadvantages:
1. If used in-correctly it would have undesirable effects – good chance of getting stuck in an endless loop. But hey, as long as you have a good save before you mess around and know how to kill things, you will be OK.
gamejester
 
Posts: 131
Joined: Mon Jun 21, 2004 9:20 am

Postby marque on Fri Jan 14, 2005 6:43 pm

I think I found an way to make toggle button with girder (I love that piece of bits) but Im not sure if you are looking for an solution that needs an third party app?
marque
 
Posts: 55
Joined: Thu Dec 09, 2004 11:18 pm

Postby jpoveda on Mon Jan 17, 2005 9:17 am

Hi marque

Could you post it?. I use girder and I'm interested in it.
jpoveda
 
Posts: 111
Joined: Mon May 17, 2004 6:45 am
Location: Spain

Postby marque on Mon Jan 17, 2005 1:56 pm

In this example I will make an toggle button for add album and play album events. So at the end you will have one button that shows the text "add album" and when you click it you will set the event "add album" and the button shows the text "play album", when you click it againit will set the event "play album" and shows the text "add album" again.

When you make an button this way you can give it as much states you like.
In my skin (Multi Media Master) I have examples of buttons with 3 and 4 states.

In xlobby go to the event manager and make three events.
first event with an command "send girder eventstring" and value "toggle_button1"
The second event has two commands 1: music:album add 2: xlobby:button set text with the value "play album" and button ID "toggle_botton1", rename this event "toggle add"
The third event has also two commands 1: music:album play 2: xlobby:button set text with the value "add album" and button ID "toggle_botton1", rename this event "toggle play"
Now go to the skin editor and make one button with the id "toggle_botton1" and select the event to send an eventstring to girder.
Exit xlobby.
Image

Install the girder2xlobby plugin that can be found here:
http://www.xlobby.com/forum/viewtopic.p ... der2xlobby
and run it for the skin you are using. You dont need the Convert_Girder2xlobby_to_GML script.

Start girder.
1 You need to make an new commands, call it album add.
2 Select the command and click plugin
3 Select the girder2xlobby plugin and Click settings, an popup will show all the events used in you xlobby skin.
4 Select the event "toggle add" and click OK

Repeat the steps 1-4 to make an command album play

5 Learn the event (by click learn event in girder and then click te new button in xlobby) for both of the girder commands and assign state settings (go to the command, left mouse, state settings, for the add command use 'state count 2' and 'begin state 1' and for the play command use 'state count 2' and 'begin state 2', so now both of the commands have the same event string but they will only execute when their time has gone (one afer the other).
thats it.
Image

Unfortunatly it is not possible to change the buttons image like this (like button set image), i already requested this but till then we have to wait and do it with this.

Good Luck and please give me some feedback.

Edit: I just came to the idea that you can make an show/hide button like this.

Make an new text field with any text and give it an ID #. go to the event manager and select the "add album" event. add to this event and "button set text" command with as text "Click to toggle play album" and the right button ID. Do the same for the "play album event.
In the skin editor now add the show/hide action for the toggle button and you done, now you can see what will happen when you click the button.
marque
 
Posts: 55
Joined: Thu Dec 09, 2004 11:18 pm

Postby marque on Sun Jan 23, 2005 1:48 am

jpoveda, did you aready tryed it?
I realy like to hear from you if you get it to work.
marque
 
Posts: 55
Joined: Thu Dec 09, 2004 11:18 pm

Postby jpoveda on Mon Jan 24, 2005 3:20 pm

Hi,

I was away. I'll try tonight.
jpoveda
 
Posts: 111
Joined: Mon May 17, 2004 6:45 am
Location: Spain

Postby jpoveda on Tue Jan 25, 2005 7:25 am

Hi marque,

I tried past night without success. Don't worry because the problem was my stupid printer (It eats some characters on the right of the page). I've read the thread this morning and now I know what I did wrong and I think it should works perfectly and as you said, you can change the image with show/hide button. Only take note about initial button state. After a software crash is usual to get a wrong state, so you should set up the state and the text button (show/hide too) at start up (In girder and xlobby too).
jpoveda
 
Posts: 111
Joined: Mon May 17, 2004 6:45 am
Location: Spain

Postby marque on Tue Jan 25, 2005 8:05 pm

that wont be necesery because girder executes only one event with more commands and girder takes care of all the states. if you want i can send you an example of what i mean,with eventgroup screen and girder file. there is even an way that it looks like the image of the button changes.
marque
 
Posts: 55
Joined: Thu Dec 09, 2004 11:18 pm

Postby BaddaBing on Mon Feb 21, 2005 11:34 pm

Hi Steve,
Just a gentle reminder to let you know that a toggle button would be a very welcome enhancement.
Thanks
-baddabing
BaddaBing
 
Posts: 562
Joined: Fri Mar 26, 2004 2:39 pm
Location: DFW Texas

Postby lar282 on Thu May 05, 2005 6:58 pm

Just a question. Why is this a sticky thread? Is it solved or sticky cause of the workaround and Steven will not implement it?


//Lasse
lar282
 
Posts: 1682
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby BaddaBing on Fri May 06, 2005 2:48 am

Steven typically makes topics that he will be working on 'sticky' Looks like this one has finally bubbled up - so hopefully we will see a permanent solution in XL in the near future.
BaddaBing
 
Posts: 562
Joined: Fri Mar 26, 2004 2:39 pm
Location: DFW Texas

Postby lar282 on Fri May 06, 2005 5:40 am

great, thanks for the info


//Lasse
lar282
 
Posts: 1682
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby Hiller on Tue Jul 19, 2005 3:08 pm

I would LOVE to see the auto-repeat button! My XLobby life would be so much better!

Steve
Hiller
 
Posts: 149
Joined: Thu Sep 25, 2003 2:39 am
Location: Fredericksburg, VA

Postby hjackson on Mon Oct 24, 2005 1:19 am

Steven, it's coming up to a year since I RE-REQUESTED this seemingly highly sought after feature. Come on dude, give us a little love on this! :P Please don't force me to use, shudder, Girder for this, shudder.

hjackson
hjackson
 
Posts: 371
Joined: Sat Nov 29, 2003 7:12 am
Location: Tampa, Florida

Re: Specialized buttons

Postby samsonlov on Fri Jun 05, 2009 6:53 pm

Plump
(Please Bump.)
:)
samsonlov
 
Posts: 274
Joined: Thu Sep 25, 2008 1:39 am
Location: Los Angeles, CA

Previous

Return to Feature Requests

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron