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 728563 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Track Info Panel with ability to change font

Reply #375
buttons just don't display no matter what for me. :/
err... i'm not using windows any more ;)

Track Info Panel with ability to change font

Reply #376
Yeah, this update sounds fantastic. But I have
a FEW questions:

I haven't understood the parameters of the $button - function .... (dstX,dstY,x,y,w,h)
Please, can someone shortly explain them to me ??

And what is ment with "Options" for the $button-function ...??

I second the request for a list of "new" functions (like $imageabs2 ), since I dont use the "Single-Column-Playlist".
To stay on this way:
"$imageabs2" is working how ??

And it was mentioned, that the font-thing had been fixed. So I can repeat my old question:
-How is the font-size measured ?? -The width of a character, or its height, or what else ?? (I dont mean px or pt. Just the dimension)


.THNX.
for your help !!

Track Info Panel with ability to change font

Reply #377
Like Sw!ng, I'd like a full explanation of $imageabs2().  I tried following this, taken from the changelog for single column display,

Code: [Select]
$imageabs2(resizeW,resizeH,srcX,srcY,srcW,srcH,dstX,dstY,image,options)

but couldn't get it working properly.  The first two parameters only seem to move the picture, not resize.  Does the track info panel version work the same as the single column display version?

Track Info Panel with ability to change font

Reply #378
buttons just don't display no matter what for me. :/

to tell the truth - i have problems too. buttons work, then suddenly i can't see them. it may be problem with caching or something ...

I haven't understood the parameters of the $button - function .... (dstX,dstY,x,y,w,h)
Please, can someone shortly explain them to me ??

dstX and dstY is position of the top-left corner of the button image (i.e. place where normal or hover button image will be placed). x, y, w and h define button's activation rectangle, i.e. rectangular place which reacts to mouse hover by displaying hover image on dstX and dstY position and reacts to mouse click by executing command specified as the 9th parameter.

this way of specifying it is nice, as you don't have to change image only directly under the activation rectangle. great example of this are the rating stars terrestrial posted above. you react to actions over individual stars, but draw the whole image.

And what is ment with "Options" for the $button-function ...??

i don't know whether ther are any possible options now or not, but this will be place to specify additional options for buttons - i can imagine ppl will request quite a few features and some of them could be specified here like in $imageabs etc.

And it was mentioned, that the font-thing had been fixed. So I can repeat my old question:
-How is the font-size measured ?? -The width of a character, or its height, or what else ?? (I dont mean px or pt. Just the dimension)

imho it depends on the font file. there's some sort of base character rectangle which specifies some guidelines / borders (even though they can be overrun) for character glypths - and you set height of this rectangle.

 

Track Info Panel with ability to change font

Reply #379
thinking about it, with buttons you could make simple tagging panel with indication of things like mood / tempo and buttons to set it. other obvious thing to set other than rating is skip state ...

edit: i did a quick test, but the "hotspots" are shifted, i have no idea what i did wrong - or if it is a bug. i had to move my mouse someplace under "joyful" for "sad" to get hover image:

):

Code: [Select]
$font(Calibri,10,Bold,90-90-90)
$alignabs(5,5,100,15,left,center)mood
$font(Calibri,10,,90-90-90)
$alignabs(22,20,100,15,left,center)sad
$alignabs(22,35,100,15,left,center)joyful
$alignabs(22,50,100,15,left,center)relaxing

$button(5,20,5,20,122,15,data\misc images\choise2-no.png,data\misc images\choise2-no-focused.png,,)
$button(5,35,5,35,122,15,data\misc images\choise2-yes.png,data\misc images\choise2-yes-focused.png,,)
$button(5,50,5,50,122,15,data\misc images\choise2-no.png,data\misc images\choise2-no-focused.png,,)


try this:

Code: [Select]
$button(5,20,0,0,117,15,data\misc images\choise2-no.png,data\misc images\choise2-no-focused.png,,)
$button(5,35,0,0,117,15,data\misc images\choise2-yes.png,data\misc images\choise2-yes-focused.png,,)
$button(5,50,0,0,117,15,data\misc images\choise2-no.png,data\misc images\choise2-no-focused.png,,)


or..

Code: [Select]
$button(5,20,0,0,0,0,data\misc images\choise2-no.png,data\misc images\choise2-no-focused.png,,)
$button(5,35,0,0,0,0,data\misc images\choise2-yes.png,data\misc images\choise2-yes-focused.png,,)
$button(5,50,0,0,0,0,data\misc images\choise2-no.png,data\misc images\choise2-no-focused.png,,)


the hotspot rect is relative to the position of the button.

I second the request for a list of "new" functions (like $imageabs2 ), since I dont use the "Single-Column-Playlist".


just $imageabs2 if I remember correctly.

Quote
And it was mentioned, that the font-thing had been fixed. So I can repeat my old question:
-How is the font-size measured ?? -The width of a character, or its height, or what else ?? (I dont mean px or pt. Just the dimension)


you can go here for all the details

Like Sw!ng, I'd like a full explanation of $imageabs2().  I tried following this, taken from the changelog for single column display,

Code: [Select]
$imageabs2(resizeW,resizeH,srcX,srcY,srcW,srcH,dstX,dstY,image,options)

but couldn't get it working properly.  The first two parameters only seem to move the picture, not resize.  Does the track info panel version work the same as the single column display version?


the src rect specifies which part of the resized image you want. leave it to 0s if you want the whole image.

Track Info Panel with ability to change font

Reply #380
Any ideas on my display problem, terrestrial? I'm trying to have rating stars like Youtube: displays the rating as normal stars, hovering over a star makes it look as if it's rated that much, clicking the star rates it. my test just... doesn't display :S
err... i'm not using windows any more ;)

Track Info Panel with ability to change font

Reply #381
try using absolute paths for the images...

Track Info Panel with ability to change font

Reply #382
the hotspot rect is relative to the position of the button.

aha!

as for the problem of not showing images: the issue i'm experiencing is than when i start foobar, i see no images. if i change the formatting to use other images (i have two sets with different size of the circle, with names varying only by choise / choise2 prefix), i can see them.

my guess is that track info panel mod is trying to load the images on start and because of some timeout, it ends up not loading them and showing nothing. as these "blank images" are being cached, it stays like that until the next restart (when i have to change formatting back to the original set to be able to see anything).

and terrestrial - any possibility of extending the positioning system (x,y,width,height in various functions) by for example relative values or percentage values? relative would be nice if we could put images directly into the text flow (example: using image with vertical separator directly inside text flow to visually separate it; relative positioning could come handy in case of that image being taller than line's height - i could move it up using negative relative position to make the text look vertically centered against the image). that's advanced useless stuff, i guess

Track Info Panel with ability to change font

Reply #383
Here's my code btw, gratiously stolen from an earlier visitor. I use the star images from http://commons.wikimedia.org/wiki/Stars.

Code: [Select]
$puts(rating,$if(%rating%,%rating%,0))

$button(3,3,0,0,0,0,images\rating$get(rating).png,images\rating1.png,r1,)
$button(3,3,13,0,13,13,images\rating$get(rating).png,images\rating2.png,r2,)
$button(3,3,26,0,13,13,images\rating$get(rating).png,images\rating3.png,r3,)
$button(3,3,39,0,13,13,images\rating$get(rating).png,images\rating4.png,r4,)
$button(3,3,52,0,13,13,images\rating$get(rating).png,images\rating5.png,r5,)
err... i'm not using windows any more ;)

Track Info Panel with ability to change font

Reply #384
1) I don't have photoshop installed, but I'm pretty sure it has a setting. It should be something like image attributes...

2) right now its limited to items from the context menu.

edit: I went ahead and uploaded a new version which ignores the dpi in the images.

and you can use this code

Code: [Select]
$if(%isplaying%,
$button(10,10,0,0,0,0,images\button.pause.png,images\hover.pause.png,Pause,)
,
$button(10,10,0,0,0,0,images\button.play.png,images\hover.play.png,Play,)
)


(although the buttons don't do anything )

Since you can only do things from the context menu, with foo_run you could create a run service... say called playpause that calls foobar2000 /playpause. That part works fine, and it is available from the context menu. Now how would I get the $button function call that context menu item?
Anish

Track Info Panel with ability to change font

Reply #385
it doesn't have to be on the context menu. it has to be foobar's menu command (i.e. it's the same as using /command:<comand name> from command line). you simply use the command's name, but that name can't identify more than just one specific command, or you're in trouble ...

Track Info Panel with ability to change font

Reply #386
as for the problem of not showing images: the issue i'm experiencing is than when i start foobar, i see no images. if i change the formatting to use other images (i have two sets with different size of the circle, with names varying only by choise / choise2 prefix), i can see them.

my guess is that track info panel mod is trying to load the images on start and because of some timeout, it ends up not loading them and showing nothing. as these "blank images" are being cached, it stays like that until the next restart (when i have to change formatting back to the original set to be able to see anything).

that's weird... do the images work using $imageabs2 ?

Quote
and terrestrial - any possibility of extending the positioning system (x,y,width,height in various functions) by for example relative values or percentage values? relative would be nice if we could put images directly into the text flow (example: using image with vertical separator directly inside text flow to visually separate it; relative positioning could come handy in case of that image being taller than line's height - i could move it up using negative relative position to make the text look vertically centered against the image). that's advanced useless stuff, i guess

eventually there will be some way to add images into a text stream, but extending the positioning system is not really possible as the image drawing and text drawing functions are separate.

Here's my code btw, gratiously stolen from an earlier visitor. I use the star images from http://commons.wikimedia.org/wiki/Stars.

Code: [Select]
$puts(rating,$if(%rating%,%rating%,0))

$button(3,3,0,0,0,0,images\rating$get(rating).png,images\rating1.png,r1,)
$button(3,3,13,0,13,13,images\rating$get(rating).png,images\rating2.png,r2,)
$button(3,3,26,0,13,13,images\rating$get(rating).png,images\rating3.png,r3,)
$button(3,3,39,0,13,13,images\rating$get(rating).png,images\rating4.png,r4,)
$button(3,3,52,0,13,13,images\rating$get(rating).png,images\rating5.png,r5,)

change the relative images\ to an absolute postion (or try moving the images folder to the foobar folder, first).

Since you can only do things from the context menu, with foo_run you could create a run service... say called playpause that calls foobar2000 /playpause. That part works fine, and it is available from the context menu. Now how would I get the $button function call that context menu item?
Anish

just use the name of the command (that's displayed in the context menu).

Track Info Panel with ability to change font

Reply #387
Then how (if it's possible) would you create a button to pause/unpause playback?
Anish


Track Info Panel with ability to change font

Reply #389
I got it working. Thanks. I seemed to have a weird bug or something...
The code of mine that didn't work was
Code: [Select]
$if(%_isplaying%,
.
.
.
$if(%_ispaused%,
$alignabs(24,18,30,30,left,middle)
$font(Arial,13,shadow,200-200-200)
▌▌
$button(23,23,0,0,20,20,images\button.png,images\button2.png,play,)
,
$alignabs(23,17,30,30,left,middle)
$font(Arial,19,shadow,200-200-200)

$button(23,23,0,0,20,20,images\button.png,images\button2.png,pause,)
)
)

The pause doesn't work at all and the play button, causes playback to start from the beginning of the song (when it was paused in the middle).

I re-did the code like this
Code: [Select]
$if(%_isplaying%,
.
.
.
$if(%_ispaused%,
$alignabs(24,18,30,30,left,middle)
$font(Arial,13,shadow,200-200-200)
▌▌
,
$alignabs(23,17,30,30,left,middle)
$font(Arial,19,shadow,200-200-200)►
)
$button(23,23,0,0,20,20,images\button.png,images\button2.png,playpause,)
)

and now it works fine. I don't know what why the first one didn't work??
Anyway thanks for all your help
Anish

Track Info Panel with ability to change font

Reply #390
Um, I upgraded this component now after use of it and noticed it had been update.. only to see padding.. is just gone now? I've looked all over, no answers.. :/

Track Info Panel with ability to change font

Reply #391
you can use $padding(horizontal,vertical). you can't set different padding for each border on the same axis though.

Track Info Panel with ability to change font

Reply #392
I'm having a bit of a problem with the rating code. How does one display the unrated image when track is unrated and 0 when rating is set to 0? Also I can't figure out how to rate the track on click, when I click now nothing happens.

Track Info Panel with ability to change font

Reply #393
I'm having a bit of a problem with the rating code. How does one display the unrated image when track is unrated and 0 when rating is set to 0? Also I can't figure out how to rate the track on click, when I click now nothing happens.

for rating = 0 you need special logic and possibly another image for no rating at all. it depends on your use, some users do not use zero rating or consider it to be the same as no rating (of course if you want to remove rating from already rated song, the basic formatting posted there wouldn't help, you would need special button for that).

for rating the track on click - you need to set up masstager / quicktag / custominfo commands to do these actions, name them like "rate 1" or "set rating = 2" etc. and then use that name as command parameter for $button function.

Track Info Panel with ability to change font

Reply #394
Thanks for the reply. I have custominfo plugin. The code 'Set Rating = 5' doesn't work for me.

Track Info Panel with ability to change font

Reply #395
Did you actually set up a script?
err... i'm not using windows any more ;)

Track Info Panel with ability to change font

Reply #396
Script?

Track Info Panel with ability to change font

Reply #397
as i said, you got to go to (in this case) custom info's settings and create "tag item" like:

name:Custom Info/Rate 0
field name:RATING
value:0

etc.

Track Info Panel with ability to change font

Reply #398
I have that.
Name: Rate/1
Field Name: RATING
Value: 1

etc.

Track Info Panel with ability to change font

Reply #399
that's not a good name, as you probably couldn't identify that command just by "1". i suggest you rename your actions to something like "Rate/Rate 1" etc. you would use "Rate 1" (without the quotation marks) as command parameter in $button.