overide playlist click event?

This is the place to post your skins, and discuss skinning

overide playlist click event?

Postby S Pittaway on Wed Apr 25, 2007 7:27 am

Hi,

i always perfered the way MP managed the playllist so and i had an idea about how to do it last night -


i wanted to break my playlist (can do the same thing for other cats) up into

[track name 1.............artist 1...length] [rating] [up] [down] [delete]
[track name 2.............artist 2...length] [rating] [up] [down] [delete]
[track name 3.............artist 3...length] [rating] [up] [down] [delete]
[track name 4.............artist 4...length] [rating] [up] [down] [delete]
....
[track name x.............artist x...length] [rating] [up] [down] [delete]
etc

This is the kind of MP layout works well, you can cursor arround the playlist and edit it without any menus.


I did this by having 5 playliost cats on the screen and then positioning them correctly, also set instant update to keep everything in line...

It looks they way i wanted and works well woith cursoring.



i wanted to set it so -

click [song 1 info ] - plays the track
click [up] - move the track up
click [down] - move the track down
click [delete] - delete the track
click [rating] - toggle the track rating (??)

I can do the first 4 by calling m3u delete/play/up/down but is there anyway of stoping the default action on a cat and replacing it with another event call?



Cheers, Sean.
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby S Pittaway on Thu Apr 26, 2007 8:02 am

to answer my own question...

when i enter each of the cats is set the event to be delete/play/up/down as needed, when clicked the do what the are supposed to.

for the rating i set it to be "m3u up", and link and event to the click, this event is -
"m3u down"
"cat:execute:playlist"
"m3u up"
"do the rating stuff"

as long as multithreaded is off it does not cause any problems.

its not the cleanest solution, but (like so many things in xlobby) it works.


Sean.
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby stevenhanna6 on Thu May 03, 2007 2:05 am

yah we are planning doing something like in your first post, so in the end people will be given the choice to use this new way or the old way.
stevenhanna6
 
Posts: 904
Joined: Tue Feb 18, 2003 10:39 am
Location: Ontario, Canada

Postby S Pittaway on Tue May 22, 2007 2:27 pm

i was being a bit thick, 400+ views and no one said anything :)

an easier way is to simply set the info screen for the category to be the current screen.

this makes it ignore the click setting and simply runs the "on click event instead".




one funny that i noticed was that the sceen name that is sent to a plugin (via the on event delegate) is capitailised....

only noticed because my skins plugin checks the screen that is being entered and kicks code off apropriately, and this was not working.
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Re: overide playlist click event?

Postby scottw on Sun Jan 06, 2008 2:12 am

I know this is old but I just wanted to thank Sean (S Pittaway) for posting this. To be honest when I first saw this I did not fully understand what you were doing.
I wanted to do exactly what you have done here and remembered reading about this. I tested what I thought seemed right according to your post and it worked great.

Just wanted to say thanks :D
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland