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.
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.
You need to make an new commands, call it album add.
Select the command and click plugin
Select the girder2xlobby plugin and Click settings, an popup will show all the events used in you xlobby skin.
Select the event "toggle add" and click OK
Repeat the steps 1-4 to make an command album play
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).
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.