Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Track Info Panel with ability to change font (Read 728597 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Track Info Panel with ability to change font

Reply #850
Here's the rating code that I've been using for a while. It works like WMP stars and is based on a scale of 1-10 so you can have half stars. I also made it so that you could change the size and position of the stars easily using variables:

Code: [Select]
//Start Variables
$puts(ratewidth,90)
$puts(xpos,15)
$puts(ypos,2)
$puts(imagedir,C:\Program Files\foobar2000\images\Ratings\)
//End Variables

$drawrect(,,,,brushcolor-SYSCOL-15 pencolor-null)
$puts(rating,$ifgreater(%RATING%,10,$puts(rate,$div($add(%RATING%,5),10)),$puts(rate,%RATING%)))
$imageabs2($get(ratewidth),$div($get(ratewidth),5),,,,,$get(xpos),$get(ypos),$get(imagedir)$if2(%rating%,0).png,alpha-95)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),9),0,$get(ratewidth),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'10.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'10.png,alpha-115)',TAG:SET:Rating:10,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),8),0,$mul($div($get(ratewidth),10),9),20,'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'9.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'9.png,alpha-115)',TAG:SET:Rating:9,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),7),0,$mul($div($get(ratewidth),10),8),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'8.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'8.png,alpha-115)',TAG:SET:Rating:8,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),6),0,$mul($div($get(ratewidth),10),7),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'7.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'7.png,alpha-115)',TAG:SET:Rating:7,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),5),0,$mul($div($get(ratewidth),10),6),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'6.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'6.png,alpha-115)',TAG:SET:Rating:6,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),4),0,$mul($div($get(ratewidth),10),5),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'5.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'5.png,alpha-115)',TAG:SET:Rating:5,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),3),0,$mul($div($get(ratewidth),10),4),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'4.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'4.png,alpha-115)',TAG:SET:Rating:4,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),2),0,$mul($div($get(ratewidth),10),3),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'3.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'3.png,alpha-115)',TAG:SET:Rating:3,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),1),0,$mul($div($get(ratewidth),10),2),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'2.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'2.png,alpha-115)',TAG:SET:Rating:2,)
$button2($get(xpos),$get(ypos),$mul($div($get(ratewidth),10),0),0,$mul($div($get(ratewidth),10),1),$div($get(ratewidth),5),'$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'1.png,alpha-25)','$imageabs2('$get(ratewidth)','$div($get(ratewidth),5)',,,,,,,'$get(imagedir)'1.png,alpha-115)',TAG:SET:Rating:1,)
$button2(0,0,0,0,$get(xpos),$div($get(ratewidth),5),,,TAG:SET:Rating:0,)

And use the images I uploaded here (make sure to set imagedir to wherever you extract them):
http://www.mytempdir.com/1131194

Now if only I could figure out how to get that tagging progressbar not to show up


Damn id like to use that system, i changed the image dir to my specs but the images dont show up.... the rating system works

Track Info Panel with ability to change font

Reply #851
Hi all

Is there some kind of syntax that will allow the $button function to run two commands at a time?

something like this:
$button(DstX,DstY,X,Y,W,H,IMAGE1,IMAGE2,CMD1;CMD2,OPTIONS)

Thanks

Track Info Panel with ability to change font

Reply #852
updated with a couple of little things + tag operations use the new async tag functions, so no more updating tag dialog.

Track Info Panel with ability to change font

Reply #853
Damn id like to use that system, i changed the image dir to my specs but the images dont show up.... the rating system works
Make sure you have a "\" at the end of the path.

Also, the newest version of the panel seems to have messed up the button and image alignment in my rating code. Ill have to play with it and figure out what's going on. Terrestrial, do you have a copy of the previous version (before the version released today) uploaded somewhere?

I would also like to request a couple of features. First, would it be possible to make persistent variables global to all trackinfo panels and SCPL? Second, could you maybe make some kind of support for multiple selections? Maybe you could have an alternate code box which would be shown when multiple tracks are selected, or just a code section like "//Multiple Items" I made a style tagging panel, but its not really useful right now because I can only tag one track at a time.

Track Info Panel with ability to change font

Reply #854
nope, I don't keep older binaries. If you have more details on your problem I can try and fix it for the next version, though

Both the feature requests are already on the todo list


 

Track Info Panel with ability to change font

Reply #856
I couldn't get my text buttons to work and then I took this piece of code of the wiki and found out it also doesn't work

$button2(0,0,0,0,30,13,$font(tahoma,8,,0-0-0)Forward,$font(tahoma,8,underline,0-0-0)Forward,'Seek ahead by 10 seconds',)

so what's wrong with it or what do I have to do to get it to work? I have also noticed that alphaex32 rating code doesn't work correctly anymore. The text is just displayed wrong just try it out...

please fix this and great plugin by the way


Track Info Panel with ability to change font

Reply #858
Question: is it possible for $button to access context menu commands from foo_utils? When I had a "regular" button toolbar (before I started trying to convert my buttons into trackinfo_mod buttons), I had a button called "Insert into Playlist Bla" that triggered the command "Edit Other/Insert Into Specified Playlist/Bla". But now that I'm trying to make a button to do the same thing in trackinfo_mod, I can't get it to work. I assume this is because that command comes from foo_utils? Or am I missing something?

Thanks,

-Nate

Track Info Panel with ability to change font

Reply #859
nope, I don't keep older binaries. If you have more details on your problem I can try and fix it for the next version, though

Both the feature requests are already on the todo list
I'm not sure exactly what the problem is, but the code that I was using before for my rating buttons just doesnt work the way it did before I upgraded. The button image and actual clickable area doesnt seem to be aligning correctly. Here's the code I'm using if you want to try it yourself, because I've tried cleaning it up rechecking everything, and I can't figure out what's wrong:

Code: [Select]
//Start Variables
$puts(ratewidth,90)
$puts(xpos,8)
$puts(ypos,2)
$puts(imagedir,C:\Program Files\foobar2000\images\Ratings\)
//End Variables

$drawrect(,,,,brushcolor-SYSCOL-15 pencolor-null)
$puts(rateheight,$div($get(ratewidth),5))
$puts(halfstar,$div($get(ratewidth),10))

$puts(rating,$ifgreater(%RATING%,10,$puts(rate,$div($add(%RATING%,5),10)),$puts(rate,%RATING%)))
$imageabs2($get(ratewidth),$get(rateheight),,,,,$get(xpos),$get(ypos),$get(imagedir)$if2(%rating%,0).png,alpha-95)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),9),0,$mul($get(halfstar),10),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'10.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'10.png,alpha-115)',TAG:SET:Rating:10,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),8),0,$mul($get(halfstar),9),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'9.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'9.png,alpha-115)',TAG:SET:Rating:9,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),7),0,$mul($get(halfstar),8),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'8.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'8.png,alpha-115)',TAG:SET:Rating:8,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),6),0,$mul($get(halfstar),7),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'7.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'7.png,alpha-115)',TAG:SET:Rating:7,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),5),0,$mul($get(halfstar),6),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'6.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'6.png,alpha-115)',TAG:SET:Rating:6,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),4),0,$mul($get(halfstar),5),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'5.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'5.png,alpha-115)',TAG:SET:Rating:5,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),3),0,$mul($get(halfstar),4),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'4.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'4.png,alpha-115)',TAG:SET:Rating:4,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),2),0,$mul($get(halfstar),3),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'3.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'3.png,alpha-115)',TAG:SET:Rating:3,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),1),0,$mul($get(halfstar),2),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'2.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'2.png,alpha-115)',TAG:SET:Rating:2,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),0),0,$mul($get(halfstar),1),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'1.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'1.png,alpha-115)',TAG:SET:Rating:1,)
$button2(0,0,0,0,$get(xpos),$get(rateheight),,,TAG:SET:RATING:,)
And here are the images again: http://www.mytempdir.com/1131194

If anyone has a copy of the previous version so I can confirm this, please let me know.

Track Info Panel with ability to change font

Reply #860
... I place a picture of the artist...
Where did you find them?


I wrote a batch-script to download them from last.fm. I did this in C and used the URL2File command line app to do the downloading. Im working on making a service that other people can use yet does not give any undue and "impolite" strain on last.fm, this is also based on another's code and I need to receive their permission also.

Track Info Panel with ability to change font

Reply #861
I couldn't get my text buttons to work and then I took this piece of code of the wiki and found out it also doesn't work

$button2(0,0,0,0,30,13,$font(tahoma,8,,0-0-0)Forward,$font(tahoma,8,underline,0-0-0)Forward,'Seek ahead by 10 seconds',)

you need single quotes around the code in the button:

Code: [Select]
$button2(0,0,0,0,30,13,'$font(tahoma,8,,0-0-0)Forward','$font(tahoma,8,underline,0-0-0)Forward','Seek ahead by 10 seconds',)

I noticed the same problem, too.
However, it seems that the cause is not progressive jpeg format but an embedded thumbnail image.
It's nice when people find the problem, and then diagnose the cause also
Do you plan to make a "fix" for this issue?

It should be fixed. (ie not use embedded thumbnails anymore).

Question: is it possible for $button to access context menu commands from foo_utils? When I had a "regular" button toolbar (before I started trying to convert my buttons into trackinfo_mod buttons), I had a button called "Insert into Playlist Bla" that triggered the command "Edit Other/Insert Into Specified Playlist/Bla". But now that I'm trying to make a button to do the same thing in trackinfo_mod, I can't get it to work. I assume this is because that command comes from foo_utils? Or am I missing something?

Thanks,

-Nate

should be no problem. the command has to match exactly though.

I'm not sure exactly what the problem is, but the code that I was using before for my rating buttons just doesnt work the way it did before I upgraded. The button image and actual clickable area doesnt seem to be aligning correctly. Here's the code I'm using if you want to try it yourself, because I've tried cleaning it up rechecking everything, and I can't figure out what's wrong:

I see the problem. Try this code:

Code: [Select]
//Start Variables
$puts(ratewidth,90)
$puts(xpos,8)
$puts(ypos,2)
$puts(imagedir,C:\Program Files\foobar2000\images\Ratings\)
//End Variables

$drawrect(,,,,brushcolor-SYSCOL-15 pencolor-null)
$puts(rateheight,$div($get(ratewidth),5))
$puts(halfstar,$div($get(ratewidth),10))

$puts(rating,$ifgreater(%RATING%,10,$puts(rate,$div($add(%RATING%,5),10)),$puts(rate,%RATING%)))
$imageabs2($get(ratewidth),$get(rateheight),,,,,$get(xpos),$get(ypos),$get(imagedir)$if2(%rating%,0).png,alpha-95)
$button2(0,0,0,0,$get(xpos),$get(rateheight),,,TAG:SET:RATING:,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),0),0,$mul($get(halfstar),1),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'1.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'1.png,alpha-115)',TAG:SET:Rating:1,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),1),0,$mul($get(halfstar),2),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'2.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'2.png,alpha-115)',TAG:SET:Rating:2,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),2),0,$mul($get(halfstar),3),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'3.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'3.png,alpha-115)',TAG:SET:Rating:3,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),3),0,$mul($get(halfstar),4),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'4.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'4.png,alpha-115)',TAG:SET:Rating:4,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),4),0,$mul($get(halfstar),5),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'5.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'5.png,alpha-115)',TAG:SET:Rating:5,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),5),0,$mul($get(halfstar),6),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'6.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'6.png,alpha-115)',TAG:SET:Rating:6,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),6),0,$mul($get(halfstar),7),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'7.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'7.png,alpha-115)',TAG:SET:Rating:7,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),7),0,$mul($get(halfstar),8),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'8.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'8.png,alpha-115)',TAG:SET:Rating:8,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),8),0,$mul($get(halfstar),9),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'9.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'9.png,alpha-115)',TAG:SET:Rating:9,)
$button2($get(xpos),$get(ypos),$mul($get(halfstar),9),0,$mul($get(halfstar),10),$get(rateheight),'$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'10.png,alpha-25)','$imageabs2('$get(ratewidth)','$get(rateheight)',,,,,,,'$get(imagedir)'10.png,alpha-115)',TAG:SET:Rating:10,)

The button order is just reversed. In previous versions, with overlapping buttons the last one would get executed, while the newer one executes the first one.

Track Info Panel with ability to change font

Reply #862
The button order is just reversed. In previous versions, with overlapping buttons the last one would get executed, while the newer one executes the first one.
Thank you so much, I was afraid that something had gone horribly wrong after the update. It works great!

Track Info Panel with ability to change font

Reply #863
Report on the cpu problem again. I found out fb2k consumes much (75%) cpu with an empty PerSeconds section when the panel is in full screen, 1024x768 on my notebook. When the panel is e.g. lke 50x100, fb2k only uses 5% cpu.

So this seems like a redraw inefficiency. If redrawing is that consuming on my notebook I wish the plugin would do it more efficiently?!


Track Info Panel with ability to change font

Reply #865

Is it possible to make the rating system like iTunes where there are blank stars for unrated tracks then you can click and rate within the info panel?

I'm pretty new to trackinfo mod and I know that there are many way better ways of doing this but if you put two imagefiles in your Images directory named greystar.png and yellowstar.png and then insert this code you should have something simular

Code: [Select]
$select(%rating%,
$puts(status1,yellow),
$puts(status1,yellow)$puts(status2,yellow),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow)$puts(status4,yellow),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow)$puts(status4,yellow)$puts(status5,yellow))

$button(5,HORISONTAL Position,0,0,0,0,Images\$if3($get(status1),grey)star.png,Images\yellowstar.png,TAG:SET:rating:1,)
$button(23,HORISONTAL Position,0,0,0,0,Images\$if3($get(status2),grey)star.png,Images\yellowstar.png,TAG:SET:rating:2,)
$button(41,HORISONTAL Position,0,0,0,0,Images\$if3($get(status3),grey)star.png,Images\yellowstar.png,TAG:SET:rating:3,)
$button(59,HORISONTAL Position,0,0,0,0,Images\$if3($get(status4),grey)star.png,Images\yellowstar.png,TAG:SET:rating:4,)
$button(77,HORISONTAL Position,0,0,0,0,Images\$if3($get(status5),grey)star.png,Images\yellowstar.png,TAG:SET:rating:5,)

and of course change the HORISONTAL Position to what suites you ;)


I tried your code but I am unsure where the images should go and also how to align the rating star buttons to the bottom. Thank you for your time.

Track Info Panel with ability to change font

Reply #866
Report on the cpu problem again. I found out fb2k consumes much (75%) cpu with an empty PerSeconds section when the panel is in full screen, 1024x768 on my notebook. When the panel is e.g. lke 50x100, fb2k only uses 5% cpu.

So this seems like a redraw inefficiency. If redrawing is that consuming on my notebook I wish the plugin would do it more efficiently?!


did you do the bitblt benchmark?

Track Info Panel with ability to change font

Reply #867
found it...

Track Info Panel with ability to change font

Reply #868
Hi terrestrial,I want to hank you again for this wonderful pugin,it's hard to find a config thisdays that doesn't use your components,but i have a little request:I have an albumart dispalyed in the trackinfo mod,it works fine,except for one minor issue:every time a track chages it keeps allocating additional RAM,I mean it doesn' t
frees up the memory allocated for the previous track pic when moving to the next one.So my question is:is it possible to free up the memory allocated for the image when a track changes or is it impossible during to SDK
limitations?Would like to se it implemented (if possible),thanks for your time.
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #869
Code: [Select]
$if(%rating%,
$select(%rating%,
$puts(status1,yellow)$puts(status2,grey)$puts(status3,grey)$puts(status4,grey)$puts(status5,grey),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,grey)$puts(status4,grey)$puts(status5,grey),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow)$puts(status4,grey)$puts(status5,grey),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow)$puts(status4,yellow)$puts(status5,grey),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow)$puts(status4,yellow)$puts(status5,yellow)),
$puts(status1,grey)$puts(status2,grey)$puts(status3,grey)$puts(status4,grey)$puts(status5,grey)
)

$button(1,184,0,0,0,0,Images\$if3($get(status1),grey)star.png,Images\yellowstar.png,TAG:SET:rating:1,)
$button(18,184,0,0,0,0,Images\$if3($get(status2),grey)star.png,Images\yellowstar.png,TAG:SET:rating:2,)
$button(35,184,0,0,0,0,Images\$if3($get(status3),grey)star.png,Images\yellowstar.png,TAG:SET:rating:3,)
$button(52,184,0,0,0,0,Images\$if3($get(status4),grey)star.png,Images\yellowstar.png,TAG:SET:rating:4,)
$button(69,184,0,0,0,0,Images\$if3($get(status5),grey)star.png,Images\yellowstar.png,TAG:SET:rating:5,)

$if(%mood%,
$select(%mood%,
$puts(status1,red)$puts(status2,grey)$puts(status3,grey),
$puts(status1,red)$puts(status2,red)$puts(status3,grey),
$puts(status1,red)$puts(status2,red)$puts(status3,red)),
$puts(status1,grey)$puts(status2,grey)$puts(status3,grey)
)

$button(150,184,0,0,0,0,Images\$if3($get(status1),grey)heart.png,Images\redheart.png,TAG:SET:mood:1,)
$button(167,184,0,0,0,0,Images\$if3($get(status2),grey)heart.png,Images\redheart.png,TAG:SET:mood:2,)
$button(183,184,0,0,0,0,Images\$if3($get(status3),grey)heart.png,Images\redheart.png,TAG:SET:mood:3,)

(%isplaying%,
// PerSecond
$rgb(245,245,245)Artist: $rgb()$rgb(255,135,0)%album artist%$char(10)$rgb()
$rgb(245,245,245)Album: $rgb()$rgb(255,135,0)%album%$char(10)$rgb()
$rgb(245,245,245)Title: $rgb()$rgb(255,135,0)%title%$char(10)$rgb()
$char(10)
//---------------------------// <---------(THIS PART SHIFTS ON TOP)
$rgb(245,245,245)Duration: $rgb(255,255,200)[%_time_elapsed%]$rgb() $rgb(245,245,245)/ $rgb()$rgb(255,135,0)%_length%$rgb()
//ADDITIONAL CODE FOR PROGRESS BAR//
$puts(progchar,|)
$puts(progfore,0000ff)
$puts(progback,999999)
$puts(proglength,85)
$char(10)
$get(head)$get(file)
$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,$get(proglength),$get(progfore)$get(progchar),$get(progback)$get(progchar))$get(bright) $rgb(255,255,0)$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)'%'
//END OF CODE
$char(10)
$char(10)
$rgb(245,245,245)Codec: $rgb()$rgb(255,135,0)%codec%$rgb()$char(10)
$rgb(245,245,245)Bitrate: $rgb()$rgb(255,255,200)%bitrate%$rgb()$rgb(255,255,0) kbps $rgb()$rgb(255,255,200)%codec_profile%  $char(10)$rgb()
$rgb(245,245,245)Filesize: $rgb()$rgb(255,255,200)$div(%_filesize%,1048576).$num($div($mul($mod(%_filesize%,1048576),100),1048576),2)$rgb()$rgb(255,255,0) MB $char(10) $rgb()
$rgb(245,245,245)Samplerate: $rgb()$rgb(255,255,200)%samplerate%$rgb()$rgb(255,135,0) Hz %channels% $char(10)$rgb()
$char(10)
$rgb(245,245,245)Played: $rgb()$rgb(255,255,200)%play_counter%$rgb()$rgb(255,135,0) times $char(10)$rgb()


This my code for my display and I also and going to add a screenshot plus the icons for the hearts and stars.

Track Info Panel with ability to change font

Reply #870
Screenshot

The stars and hearts in the track info window are actually clickable and will edit the tracking rating or mood and can also be easily changed with any image too. I just figured I would share everything with you.

Grey Heart
Grey Star
Red Heart
Yellow Star


Track Info Panel with ability to change font

Reply #872
Any chance of letting trackinfo panel to read from external files or databases?
I'd like to show last.fm wiki and tag information with my tracks.

Track Info Panel with ability to change font

Reply #873
Here's the trackinfo I just finished last night.  First to give credit where credit is due, the original coding is not mine.  You can see the credits at the top of the code.  However, this was for the original version of trackinfo I think, so I've recoded it for the newest trackinfo_mod.  It's also been tweaked to display what I want, and I removed the playcount code cause I don't use it.

The main reason I'm posting it is it's my first shot at buttons and images in trackinfo.  I thought it would be useful since the placement of all elements and the sizing of the albumart+overlay is dynamic based on the size of your trackinfo panel.  The images will grow and shrink with the panel (contrary to the trackinfo_mod wiki, you can stretch an image to greater than it's original size with the $imageabs2() function if you enable nokeepaspect).

Some tweaking may be necessary to the initial placement of elements depending on your screen resolution, but after that it should take care of itself.  I'll try to make it clear in the comments.  You'll also need a default.jpg image in case of no albumart.

A link to the images used for the cd case overlay and the buttons, and a screenshot are at the bottom.  The overlay pic is from a thread in the uploads forums about album art overlay images.  I'm using the newest version of uie_trackinfo_mod v0.8.0 beta dated Jan. 5th.  Thanks to everyone from whom I borrowed stuff!

Questions and comments encouraged!

Code: [Select]
// Original code by necropimp, then modified by AstreaEdge, and again by KockRoach
// Habla likes things his way, and modified it more.
// Best viewed with vert pad 10, hor pad 8, line space 3, Calibri 8pt bold font, black background
// lots of info needs lots of space 8)

// !!!!BEGIN USER CONFIGURATION!!!!

// Global

// Show Artist? (1 = show, 0 = don't show)
$puts(arts,1)

// Show Album?
$puts(albs,1)

// Show Title?
$puts(tils,1)

// Info Heading Color e.g. "Title:"
$puts(head,$rgb(201,201,201))

// Info Color, e.g. "Black Dog"
$puts(info,$rgb(255,255,255))

// Info Annotation Color (e.g . "kbps" is the annotation)
$puts(anno,$rgb(255,255,255))

// Separator
$puts(text2,$rgb(255,255,255))
$puts(glow,$font(Calibri,8,bold glow-255-0-0 glowalpha-120,))
$puts(orig,$font(Calibri,8,bold,))
$puts(text1,$rgb(255,0,0))
$puts(fadeend,$rgb(0,0,0))
$puts(seplen,32)
$puts(sepchar,'-')

// Define center of panel
$puts(cenPx,$div(%_width%,2))

// Define starting height of info, button, and progress bar elements
$puts(infoY,$sub(%_height%,270))
$puts(butY,$sub(%_height%,63))
$puts(progY,$add($get(butY),38))

// Define case and art dynamic values
// Case width and height (pic has case and overlay as one)
$puts(caseW,$sub(%_width%,30))
$puts(caseH,$muldiv(400,$get(caseW),445))

// Old code with separate gloss overlay
//$puts(glossW,$muldiv(303,$get(caseW),360))
//$puts(glossX,$add($muldiv(45,$get(caseW),360),0))
//$puts(glossY,$add($muldiv(12,$get(caseH),330),4))

// Art width and height
$puts(artW,$muldiv(400,$get(caseW),445))
$puts(artX,$add($muldiv(45,$get(caseW),445),15))

// Border around case+art
$puts(border,15)


// Background

// Code for optional bg image
//$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,/components\default.jpg,alpha-40 nokeepaspect)


////////////////////////////////////////////////
////!!!END USER CONFIGURATION!!////
//////////////////////////////////////////////

// PerTrack

// Art is bottom layer, if no art then use a default image
$imageabs2($get(artW),$get(artW),0,0,$get(artW),$get(artW),$get(artX),$get(border),
$if($fileexists($replace(%path%,%filename_ext%,'folder.jpg')),
$replace(%path%,%filename_ext%,'folder.jpg')
,
'/components\default.jpg'
),valign-t nokeepaspect)

// CD case overlay
$imageabs2($get(caseW),$get(caseH),0,0,$get(caseW),$get(caseH),$get(border),$get(border),'/images\case\case2.png',valign-t nokeepaspect)

// Button code
$button($sub($get(cenPx),90),$get(butY),12,8,20,20,'/images\red\stop.png','/images\red\stopR_h.png','Stop',)
$button($sub($get(cenPx),54),$get(butY),0,8,36,20,'/images\red\prev.png','/images\red\prevR_h.png','Previous',)
$button($sub($get(cenPx),18),$get(butY),0,0,36,36,'/images\red\playR.png','/images\red\playR_h2.png','Play or pause',)
$button($add($get(cenPx),18),$get(butY),0,8,36,20,'/images\red\next.png','/images\red\nextR_h.png','Next',)
$button($add($get(cenPx),54),$get(butY),8,8,20,20,'/images\red\mute.png','/images\red\muteR_h.png','Volume mute',)

// PerSecond

// SONG INFO SEPARATOR

$alignabs(0,$get(infoY),%_width%,%_height%,center,top)
'#LINEHEIGHT,16#'

$transition($repeat($get(sepchar),$get(seplen)),$get(fadeend),$get(text1))$get(text1)'[' $get(glow)$get(text2)S o n g I n f o $get(orig)$get(text1)']'$transition($repeat($get(sepchar),$get(seplen)),$get(text1),$get(fadeend))$char(10)

$if($strcmp(1,$get(arts)),$get(head)Artist: $get(info)[%artist%]$char(10),)
$if($strcmp(1,$get(albs)),$if(%album%,$get(head)Album: $get(info)$cut(%album%,37)
$ifgreater($len(%album%),37,'...',)$char(10),),)
$if($strcmp(1,$get(tils)),$get(head)Title: $if(%title%,$get(info)$cut(%title%,39)
$ifgreater($len(%title%),39,'...',))$char(10),$get(info)[%_filename%]$char(10))
$if(%tracknumber%,$get(head)Track #: $get(info)%tracknumber%$char(10),)
$if(%date%,$get(head)Date: $get(info)%date%$char(10),)
$if(%genre%,$get(head)Genre: $get(info)%genre%$char(10),)

// TECH INFO SEPARATOR
$char(10)
$transition($repeat($get(sepchar),$get(seplen)),$get(fadeend),$get(text1))$get(text1)'[' $get(glow)$get(text2)T e c h I n f o $get(orig)$get(text1)']'$transition($repeat($get(sepchar),$get(seplen)),$get(text1),$get(fadeend))$char(10)

$get(head)Length: $if(%_length%,$get(info)$if(%isplaying%,%_time_elapsed%$get(anno)$if(%_length%, / %_length%,)$if(%_time_elapsed%, / $muldiv(%_time_elapsed_seconds%,100,%_length_seconds%)'%')$if(%_length%, / -%_time_remaining%),%_length%),$if(%isplaying%,$get(info)Streaming  [%_time_elapsed%],))$char(10)
$get(head)Quality: $if(%__codec%, $get(info)%__codec% $get(info)
$if2(%__bitrate_dynamic%,[%__bitrate%]) $get(anno)Kb/s $if($stricmp(%__codec%,mp3),[%__codec_profile%]),)
$char(10)
$if(%__lame_version%,$get(head)Encoder: $get(info)$left(%__lame_version%,4) $right(%__lame_version%,4) [$upper(%__lame_profile%)]$char(10),)
$if(%__flac_vendor%,$get(head)Encoder: $get(info)$if($stricmp(%__flac_vendor%,reference libFLAC 1.1.2 20050205),FLAC 1.1.2 -8)$char(10),)
$if(%__mpc_profile%,$get(head)MPC Profile: $get(info)%__mpc_profile%$char(10),)
// $get(head)Compression: $get(info)$div(1411,%__bitrate%).$substr($muldiv(1411,100,%__bitrate%),2,3):1 '('$get(info)$muldiv(%__bitrate%,100,1411)$get(anno)'% of original quality)'$char(10)
$get(head)Channel Mode: $get(info)$if($stricmp($codec(),MP3),$get(space2)$caps(%__mp3_stereo_mode%),
$if(%__channels%,$ifgreater(%__channels%,1,Stereo,Mono),))$char(10)
$if(%__bitspersample%,$get(head)Bitdepth: $get(info)%__bitspersample% bits/sample$char(10),)
$get(head)Samplerate: $get(info)$if(%__samplerate%,$div(%__samplerate%,1000).$substr(%__samplerate%,3,3) KHz $char(10),$char(10))
$if(%_filesize%,$get(head)Filesize: $get(info)
$div(%_filesize%,1048576).$left($num($muldiv($mod(%_filesize%,1048576),100,1048576),2),2) $get(anno)'MB'$char(10),)

$get(head)Focus: $get(info)$if(%_trackinfo_nowplaying%,'Current Song'$if(%ispaused%,$get(text1)'  [Paused]'),'Follow Cursor'$if(%ispaused%,$get(text1)'  [Paused]'))$char(10)

$alignabs(0,$get(progY),%_width%,20,center,top)
$if(%isplaying%,$if(%_length%,$get(head)o$progress(%_time_elapsed_seconds%, %_time_total_seconds%,$div(%_width%,4),$font(Times New Roman,8,,)$get(info)$char(9835)$get(orig),$get(text1)'-')$get(head)o))


images


Track Info Panel with ability to change font

Reply #874

Question: is it possible for $button to access context menu commands from foo_utils? When I had a "regular" button toolbar (before I started trying to convert my buttons into trackinfo_mod buttons), I had a button called "Insert into Playlist Bla" that triggered the command "Edit Other/Insert Into Specified Playlist/Bla". But now that I'm trying to make a button to do the same thing in trackinfo_mod, I can't get it to work. I assume this is because that command comes from foo_utils? Or am I missing something?

Thanks,

-Nate

should be no problem. the command has to match exactly though.

Hi terrestrial-

Thanks for the reply. Ok, then, I guess I must be misunderstanding something here.

I assumed that the code would be:

$button(120,120,0,0,40,40,IMAGES\button9.png,IMAGES\button9.png,Insert into Specified Playlist\Bla,)

but that's not working. I tried a couple of obvious tinkers with that code, but couldn't get anything to work. I assume it's something to do with the slash separating the command from the playlist name, but I can't figure out how else to specify the targeted playlist. What am I missing here?

Thanks,

-Nate