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

Track Info Panel with ability to change font

Reply #450
For some mysterious reason i'm not able to get images in $button2  command,not with relative path,nor with absolute,a bug?
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #451
whats the code you're using?

Track Info Panel with ability to change font

Reply #452
whats the code you're using?

Code: [Select]
$button2(341,$add($div(%_height%,5),16),0,0,11,19,images\button.png,images\button.png,'volume mute',)
or:
$button2(341,$add($div(%_height%,5),16),0,0,11,19,'images\button.png','images\button.png','volume mute',)
or:
$button2(341,$add($div(%_height%,5),16),0,0,11,19,C:\Program Files (x86)\foobar2000\images\button.png,C:\Program Files (x86)\foobar2000\images\button.png,'volume mute',)
or:
$button2(341,$add($div(%_height%,5),16),0,0,11,19,'C:\Program Files (x86)\foobar2000\images\button.png','C:\Program Files (x86)\foobar2000\images\button.png','volume mute',)

Non of the variations shows the image,but the command is executed.Also the images is bigger than the clickable area,but it worked fine with $button,so i don't think it's a problem,or am i wrong?
Favourite artist:CD-R
Favourite album:700MB


Track Info Panel with ability to change font

Reply #454
Found the source of the problem i was talking about one post ago:if you specify active area that is smaller than the image,the image won't show up (not like in old $button command)
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #455

whats the code you're using?

Code: [Select]
$button2(341,$add($div(%_height%,5),16),0,0,11,19,images\button.png,images\button.png,'volume mute',)
or:
$button2(341,$add($div(%_height%,5),16),0,0,11,19,'images\button.png','images\button.png','volume mute',)
or:
$button2(341,$add($div(%_height%,5),16),0,0,11,19,C:\Program Files (x86)\foobar2000\images\button.png,C:\Program Files (x86)\foobar2000\images\button.png,'volume mute',)
or:
$button2(341,$add($div(%_height%,5),16),0,0,11,19,'C:\Program Files (x86)\foobar2000\images\button.png','C:\Program Files (x86)\foobar2000\images\button.png','volume mute',)

Non of the variations shows the image,but the command is executed.Also the images is bigger than the clickable area,but it worked fine with $button,so i don't think it's a problem,or am i wrong?


if you want to just use images for buttons then use the old $button command. if you want to use "code" for buttons then use $button2. so:

Code: [Select]
$button(0,0,0,0,0,0,images\button.png,images\button-hot.png,volume mute,)

or the equivalent
Code: [Select]
$button2(0,0,0,0,11,19,'$imageabs(0,0,images\button.png,)','$imageabs(0,0,images\butoon-hot.png,)',volume mute,)



Does $imageabs2 work in this module?


yes

Track Info Panel with ability to change font

Reply #456
@ terrestrial
Thanks for the explanation and of course for the amazing plugin
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #457
This code doesn't seem to show anything, even though the button behaves correctly
Code: [Select]
$button2(0,0,0,0,40,40,'$font(Arial,15,shadow,200-200-200)','$font(Arial,15,glow-250-250-250,200-200-200)',pause,)

Am I doing something wrong?
Anish

Track Info Panel with ability to change font

Reply #458
This code doesn't seem to show anything, even though the button behaves correctly
Code: [Select]
$button2(0,0,0,0,40,40,'$font(Arial,15,shadow,200-200-200)','$font(Arial,15,glow-250-250-250,200-200-200)',pause,)
?

Am I doing something wrong?
Anish

try changing both 40's to 60's
Favourite artist:CD-R
Favourite album:700MB

 

Track Info Panel with ability to change font

Reply #459
all the code has to be self contained inside the button. it doesn't carry through outside the button. think of it as a separate trackinfo panel.

Track Info Panel with ability to change font

Reply #460

This code doesn't seem to show anything, even though the button behaves correctly
Code: [Select]
$button2(0,0,0,0,40,40,'$font(Arial,15,shadow,200-200-200)','$font(Arial,15,glow-250-250-250,200-200-200)',pause,)
?

Am I doing something wrong?
Anish

try changing both 40's to 60's

I tried that. it didn't work. The height of trackinfo is 43 pixels, and the '?' fits nicely in the middle 50% height-wise, so that shouldn't be an issue anyway.
Anish

all the code has to be self contained inside the button. it doesn't carry through outside the button. think of it as a separate trackinfo panel.

OK, I got it now. Thanks
Anish

Track Info Panel with ability to change font

Reply #461
Can someone help me here. I have a panel set up with play, pause stop, next & back buttons they all work except the back button. In the run services they are all set to the same location.. etc --> D:\Audio\foobar\foobar2000.exe /Previous. When I click the back button all I get is an error box. All the others work fine.

This is my relevant trackinfo I think -->
$button($sub($div(%_width%,2),64),32,0,0,0,0,neo1\pause1b.png,neo1\pause2b.png,Pause,)
$button($sub($div(%_width%,2),40),31,0,0,0,0,neo1\prev1.png,neo1\prev2.png,Previous,)
$button($add($div(%_width%,2),17),31,0,0,0,0,neo1\next1.png,neo1\next2.png,Next,)
$button($add($div(%_width%,2),44),32,0,0,0,0,neo1\stop1.png,neo1\stop2.png,Stop,)
$button($sub($div(%_width%,2),15),26,0,0,0,0,neo1\play1.png,neo1\play2.png,Play,)

Cheers.

Track Info Panel with ability to change font

Reply #462
Try instead of "previous" ... only "prev".

((((( Strictly4me )))))

Track Info Panel with ability to change font

Reply #463
Thank you very much

Track Info Panel with ability to change font

Reply #464
Would it possible in your next update to include the ability to change the cursor type when hovering over text?

For example:
$font(Arial, 10, underline cursor-pointer, 255-0-0)

Track Info Panel with ability to change font

Reply #465
I am trying to put useable buttons in my track info panel. The button appears but does nothing. I have run services but don't know how to configure it.  Can someone explain how to link the button with run services please.
TIA
Mr E

Track Info Panel with ability to change font

Reply #466


Hrmf. Because i've used a big $padding in this code (so that the text is aligned after the album-art), Long text drops down to the next line on long names (as it is also padded from the other side).

Anyone have an elegent solution to that?
My code is pretty basic:
Code: [Select]
$imageabs2(200,200,,,,,$sub(%_width%,215),15,'c:\Software\foobar2000\components\default.png',)
$imageabs2(200,200,,,,,$sub(%_width%,215),15,$replace(%path%,%filename_ext%,)$replace(%album%,\,_,/,_,:,_,*,_,?,_,<,_,>,_,|,_,",_)[ '('%date%')'].jpg,)
$padding(230,35)

$align(right,top)$font(Levenim MT,16,bold,255-155-55)
$upper(%title%)

$align(right,middle)$font(Levenim MT,14,bold,200-100-10)
$upper(%album artist%)

$align(right,bottom)$font(Levenim MT,14,bold,155-55-5)
%album%[ %date%]

Track Info Panel with ability to change font

Reply #467
@ChaosBlade
use this
Code: [Select]
$padding(0,0)$align(right,top)
Before the title string and adjust the padding to your liking.

use this
Code: [Select]
$padding(0,0)$align(right,bottom)
For the other stuff

You will have to fool with the padding and keep in mind that the lines under the first will be realative to that.
To have the most control you could add the string I put before everything so you can position them seprately

@terrstrial
This has probably been asked before but is it possible for you to make it so that I could use any aspect ratio for images?

Track Info Panel with ability to change font

Reply #468
I'm not sure how that helps. My issue that the padding works from both ways - So i lose 200px from each side when i want to lose 200px just from the image's side.

Track Info Panel with ability to change font

Reply #469
Try it first and see

1)I gave you a suggestion in the appearance thread to align the song title to the left so it wont trip over the stuff underneath.

2)If you align it like I said you will be able to create a line under the song title that will be used by long titles and not trip over the stuff underneath.

If you dont want the entire song title to be displayed you will have to add a variable to your string like $iflonger (I think)

Track Info Panel with ability to change font

Reply #470
So there's no way to tell it to align to the right after the image, and not wrap if it reaches that line's end?

EDIT: Did it the most ugly way possible - $alignabs with random pixel values


Track Info Panel with ability to change font

Reply #471
updated- new $button2 and support for main menu commands.

Hi,
If I understand well, we can now acces the main menu commands without using the run service.
However i don't manage to make it work.
For example if want to open the Console window, how should i do ?
Here's what i tried and none of them worked but if i use any context menu command instead, it works as intended.

Code: [Select]
$button(0,0,0,0,21,21,image.png,imagehot.png,Main/View/Console,)
or
$button(0,0,0,0,21,21,image.png,imagehot.png,'Main/View/Console',)
or
$button(0,0,0,0,21,21,image.png,imagehot.png,View/Console,)
or
$button(0,0,0,0,21,21,image.png,imagehot.png,'View/Console',)
or
$button(0,0,0,0,21,21,image.png,imagehot.png,Console,)
or
$button(0,0,0,0,21,21,image.png,imagehot.png,'Console',)

i also tried with $button2

thanks

Track Info Panel with ability to change font

Reply #472
Hi,
If I understand well, we can now acces the main menu commands without using the run service.
However i don't manage to make it work.
For example if want to open the Console window, how should i do ?
Here's what i tried and none of them worked but if i use any context menu command instead, it works as intended.

thanks


You need to use $button2. It opens the console window on mine: $button2(0,0,0,0,21,21,image.png,imagehot.png,Console,)

Track Info Panel with ability to change font

Reply #473
You need to use $button2. It opens the console window on mine: $button2(0,0,0,0,21,21,image.png,imagehot.png,Console,)

Thanks for your answer.
I thought i had updated the plugin to the last version but no (f***ing cache)
Works fine now with the last version
and it even works with both $button and $button2

Track Info Panel with ability to change font

Reply #474
Can anyone give me a little help on this. Im displaying the current track in the trackinfo_mod panel along with album art. My info is being padded beyond the album art, but this pads the right side as well, give a very small area for the text and causes it to wrap.

The picture below shows it better than i describe