Old 29th February 2004, 17:33   #1
\02
Junior Member
 
Join Date: Feb 2004
Posts: 1
idea for a playlist plugin or something

i got this idea when i was looking through my playlist looking for a cd, i have my cd's all listed like so: artist - track number - songname

and with many albums it gets hard to find which album is which (and i don't want album names in playlist, because it makes the entrys too long) so I started thinking and came to the conclusion that color coding would be nice maybe with fades, and it would look for track numbers, so a playlist would look something like supplied image

it would look for 01, 02 etc. in playlist entries and then color them, 01 with one color, 02 with another and so on..

what a bout songs with numbers then? well, it could look for "- 01 -", "01 -" or "-01-" and some more variations, I'm no good with coding, that's why I'm writing here, so I don't know if it can be done via plugins

I searched around for a similar plugin but i couldn't find one...

oh, and please nullsoft, add a function to clear selected mp3's from id3 tags so I don't have to clear every one manually =)

thanks in advance and sorry for my english
Attached Images
File Type: jpg winampplugin-low.jpg (64.8 KB, 144 views)
\02 is offline   Reply With Quote
Old 29th February 2004, 17:54   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
what you are asking for is not possible via a plugin since the drawing is done by the playlist window. that is all fixed and there's no way for a plugin to alter the text colours for individual items (though it can set the general colours like the background etc i believe now).

-daz
DrO is offline   Reply With Quote
Old 29th February 2004, 19:16   #3
Safai
Senior Member
 
Join Date: Sep 2000
Location: Canada
Posts: 249
Send a message via ICQ to Safai
Quote:
Originally posted by DrO
what you are asking for is not possible via a plugin since the drawing is done by the playlist window. that is all fixed and there's no way for a plugin to alter the text colours for individual items (though it can set the general colours like the background etc i believe now).

-daz
it is possible to change the PE color...
Attached Files
File Type: zip gen_pecolor.zip (10.4 KB, 124 views)
Safai is offline   Reply With Quote
Old 29th February 2004, 19:27   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
yeah ok i'll give you that one Safai (overriding the calls to SetTextColor() i see ). though i see it's just on a loop so it won't hold the colour for the item in the playlist

-daz
DrO is offline   Reply With Quote
Old 29th February 2004, 19:38   #5
Safai
Senior Member
 
Join Date: Sep 2000
Location: Canada
Posts: 249
Send a message via ICQ to Safai
actually, i'm overriding the DrawText, and i thought THAT would give you an idea so you can do it... it's gonna be tough to associate the playlist item since that call is called so many times... it might be possible to parse the string and change the color then... but that would be a bit cpu intensive... here is the source code... maybe you can do something else with it...
Attached Files
File Type: zip gen_pecolor.zip (19.3 KB, 119 views)
Safai is offline   Reply With Quote
Old 29th February 2004, 19:45   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
the DrawText() thing, i should have realised that (i looked at the exported functions and saw SetTextColor() - i really should look more closely at times )

i was thinking of doing that for the queuemarking in the playlist for JTFE but as you say the tricky thing is associating to an item - i've a few ideas on how it might work but i need to check out a few things first.

i'll have a look at this one now whilst i'm trying things out with other example code

-daz
DrO is offline   Reply With Quote
Old 29th February 2004, 22:51   #7
Lord Darius
Senior Member
 
Lord Darius's Avatar
 
Join Date: Jul 2003
Posts: 248
doesn't that hooking trick create the risk of side-effects in the code that will call the overloaded function for other purposes ?
Lord Darius is offline   Reply With Quote
Old 29th February 2004, 22:53   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
the code checks the window being drawn to and will only work on the playlist window.

--> http://www.nunzioweb.com/daz/pics/fux0r.gif
shows what fun you can have

-daz
DrO is offline   Reply With Quote
Old 29th February 2004, 22:59   #9
Lord Darius
Senior Member
 
Lord Darius's Avatar
 
Join Date: Jul 2003
Posts: 248
geez

yey, colors in winamp playlist !

yes, of course, if done carefuly i guess i won't mess up the whole winamp...
Lord Darius is offline   Reply With Quote
Old 29th February 2004, 23:04   #10
DrO
 
Join Date: Sep 2003
Posts: 27,873
i'm using that code as a basis for the number thing in JTFE but as it is you can only alter the text colour on a line but you can alter the background colour for the title and the number separately with the use of FillRect

i'll expand the code once i've tweaked a bit more to make it customisable

-daz
DrO is offline   Reply With Quote
Old 29th February 2004, 23:15   #11
Safai
Senior Member
 
Join Date: Sep 2000
Location: Canada
Posts: 249
Send a message via ICQ to Safai
that looks nice... can we say JTFE color edition
Safai is offline   Reply With Quote
Old 29th February 2004, 23:21   #12
DrO
 
Join Date: Sep 2003
Posts: 27,873
i think selective background/item text colouring will be in. just working on getting the queue indicator to appear correctly - need to work out how best to do it ie customisable or fixed like Winamp3 did (tempted with fixed for the initial release build).

now look at what you've caused Safai (thnx)

-daz
DrO is offline   Reply With Quote
Old 1st March 2004, 11:36   #13
Lord Darius
Senior Member
 
Lord Darius's Avatar
 
Join Date: Jul 2003
Posts: 248
oh, i'll play the bad guy again, but as yu're checking the window, are you sure you're not slowing down winamp and adding some CPU overhead since these functions are, IMHO, called very very often ?
Lord Darius is offline   Reply With Quote
Old 1st March 2004, 11:58   #14
DrO
 
Join Date: Sep 2003
Posts: 27,873
on this old box (300Mhz) there's no noticeably difference in cpu usage when resizing the window, etc so on one of those Ghz machines you'll never know

yes there will be a slight cpu hit but it's less than what subclassing the winamp window causes. if i've got it running smoothly on my machine then i think that's a good indicator for all those using their 'faster machines'.

-daz
DrO is offline   Reply With Quote
Old 1st March 2004, 15:18   #15
Safai
Senior Member
 
Join Date: Sep 2000
Location: Canada
Posts: 249
Send a message via ICQ to Safai
yeah, shouldn't be too much a problem, in my plugin, i convert the string to unicode and draw with DrawTextW... (displaying chinese on english systems) which is still acceptable on my slow p3 450...
Safai is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump