Pause/Play button with indi_active
Posted: November 29th, 2008, 4:09 am
I discovered something while creating a new skin -- not sure if it's a bug, a feature or an unsupported area. I'd like to get some views on whether what I'm trying to do should work or whether there is a better way. [Please note that I'm using PaintShopPro.]
I created a Pause/Play button [a button that shows the Pause symbol while playing and the Play symbol when paused or stopped -- just the usual] -- a few Xion skins do that.
The simple layers (with the button shapes stacked directly above each other) are:
pause indi_play
play indi_pause {you can also use pause_normal and play normal}
Adding highlights for cursor over button, you have something like:
pause_over
pause indi_play
play_over
play indi_pause
This works fine up to this point.
So that Play will show when the player is stopped, it's probably a good idea to append a basic Play button at the bottom of the visual stack:
pause_over
pause indi_play
play_over
play indi_pause
play
Now I'm rather fond of making the buttons disappear when Xion is not the active window -- the indi_active object does this. So I tried the following:
pause_over indi_active
pause indi_play indi_active
play_over indi_active
play indi_pause indi_active
play indi_active
The Pause/Play button no longer displays properly -- a number of wierd sequential conditions occur -- looks like the ganging of indicator objects doesn't work or is not allowed -- thoughts? -- comments?
Some examples of what happens:-
assume the player is stopped and window active, Play button shows but play_over doesn't seem to work. Then press Play, track starts playing, Pause button shows and pause_over works. Then press Pause, track pauses, but Pause button continues to show -- but if you press the Pause button again then the track resumes. If you've pressed Pause to pause the track (Pause button still showing rather than Play as intended) and you click away from Xion (Xion window no longer active) then all the buttons disappear (as intended) -- when you click back on Xion again the Pause/Play button has reverted to Play (as intended) and play_over now works.
Sorry, if the example is tricky to follow -- basically it looks like the indicators have got stuck in in some kind of nested state machine. Seems that switching from active to inactive and back resets or corrects the indi_play/indi_pause state.
I will try to do some more experiments to see what I come up with and post some results later.
Thanks for looking.
I created a Pause/Play button [a button that shows the Pause symbol while playing and the Play symbol when paused or stopped -- just the usual] -- a few Xion skins do that.
The simple layers (with the button shapes stacked directly above each other) are:
pause indi_play
play indi_pause {you can also use pause_normal and play normal}
Adding highlights for cursor over button, you have something like:
pause_over
pause indi_play
play_over
play indi_pause
This works fine up to this point.
So that Play will show when the player is stopped, it's probably a good idea to append a basic Play button at the bottom of the visual stack:
pause_over
pause indi_play
play_over
play indi_pause
play
Now I'm rather fond of making the buttons disappear when Xion is not the active window -- the indi_active object does this. So I tried the following:
pause_over indi_active
pause indi_play indi_active
play_over indi_active
play indi_pause indi_active
play indi_active
The Pause/Play button no longer displays properly -- a number of wierd sequential conditions occur -- looks like the ganging of indicator objects doesn't work or is not allowed -- thoughts? -- comments?
Some examples of what happens:-
assume the player is stopped and window active, Play button shows but play_over doesn't seem to work. Then press Play, track starts playing, Pause button shows and pause_over works. Then press Pause, track pauses, but Pause button continues to show -- but if you press the Pause button again then the track resumes. If you've pressed Pause to pause the track (Pause button still showing rather than Play as intended) and you click away from Xion (Xion window no longer active) then all the buttons disappear (as intended) -- when you click back on Xion again the Pause/Play button has reverted to Play (as intended) and play_over now works.
Sorry, if the example is tricky to follow -- basically it looks like the indicators have got stuck in in some kind of nested state machine. Seems that switching from active to inactive and back resets or corrects the indi_play/indi_pause state.
I will try to do some more experiments to see what I come up with and post some results later.
Thanks for looking.