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

Track Info Panel with ability to change font

Reply #725
Small feature request: Could you perhaps make a checkbox or something to use system default background color (depending on msstyle) instead of custom. That would be awesome.

Track Info Panel with ability to change font

Reply #726
I also can't work with button, no response at all

Code: [Select]
// PerTrack
$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,)


I have put // Per Track before $button  definition



The last two numeric arguments in the $button function are the width and height of the button, so your buttons have zero width and height.

You should look at the following page before asking questions in this thread:

http://wiki.hydrogenaudio.org/index.php?ti...rackinfo_mod%29

Track Info Panel with ability to change font

Reply #727
Perhaps a little off topic, but a few pages back, I saw the function $sorted(field) used in an $if statement.  I tried it in my modified info pannel, but it said [UNKNOWN FUNCTION], so I assume that it is a part of some plugin that I don't have.  Does anybody know how to get it, what plugin it might be part of?

Answered my own question; $sorted(field) is supposed to display '[UNKNOWN FUNCTION]' when the playlist is not sorted by using the SORT:etc method; I was sorting by the Columns UI column titles.

Track Info Panel with ability to change font

Reply #728
Minor feature request: auto reseting sorting context menu; from what I can tell, reseting only resets the context menu and the values of $sorted(field), and it's inconvenient to have to check too see if the field that I want to sort by now has already been used.

Track Info Panel with ability to change font

Reply #729
Terrestrial: Did you just add that awesome function for rotation since my request? That's so incredibly awesome.


you caught me at a good time and it only took about three lines to add


So how can I set spaces at the beginning of a code line now? ' ' doesn't work as well as $char(32).


Code: [Select]
test
'     'test
test


probably because of the '#'
Trackinfo mod has weird issues with #


yep. anything with # won't work in buttons.

Small feature request: Could you perhaps make a checkbox or something to use system default background color (depending on msstyle) instead of custom. That would be awesome.


Code: [Select]
$drawrect(0,0,%_width%,%_height%,pencolor-null brushcolor-SYSCOL-15)


I think 15 is correct, but you may have to try different ones.

Minor feature request: auto reseting sorting context menu; from what I can tell, reseting only resets the context menu and the values of $sorted(field), and it's inconvenient to have to check too see if the field that I want to sort by now has already been used.


sorry, I don't quite understand....

Track Info Panel with ability to change font

Reply #730

Small feature request: Could you perhaps make a checkbox or something to use system default background color (depending on msstyle) instead of custom. That would be awesome.


Code: [Select]
$drawrect(0,0,%_width%,%_height%,pencolor-null brushcolor-SYSCOL-15)


I think 15 is correct, but you may have to try different ones.

Thanks. Code is just as good.

Track Info Panel with ability to change font

Reply #731

Minor feature request: auto reseting sorting context menu; from what I can tell, reseting only resets the context menu and the values of $sorted(field), and it's inconvenient to have to check too see if the field that I want to sort by now has already been used.


sorry, I don't quite understand....


When you click on the button and the sorting context menu comes up, one choice in the context menu is "Reset", which resets the $sorted(field) values and brings back all of the original choices of fields to sort by (when you sort by artist, it goes away after).  Why couldn't you have all of the choices (eg Artist, Album,etc) remain in the context menu after sorting by them, and adjust the values of $sorted(field) with each sorting selection?

Also, the following would be nice:
1-Inline buttons
2-Right click, double click, and Click-and-drag (for seekbar among other things) for button commands
3-Minimum pannel width option
4-Command to switch between Now playing/Follow cursor mode that can be used as a button command
5-Function to calculate the of number of lines of text resulting from word wrapping of given text (helpful for adjusting display to match different sized fields)
6-Ability to use the standard functions in SORT (would like to sort by path, but %path% contains ':' which has a special meaning in SORT command, and causes it not to work
7-Ability to place pannels anywhere in info box, so they can be seemlessly and attractively incorporated into the info pannel
8-Ability to do both SORT and FILTER in the same button

Track Info Panel with ability to change font

Reply #732
Is there a way to add support for dynamical button position?

I want to make my progress clickable where the "already played area" acts as a seek back button and the other part, as a seek ahead button.

Right now, seek back button works, but not the other one. It seems to me the button width and height support dynamic values, but coordinates does not.

Here is my code:
Code: [Select]
$puts(pbarLength,996)
$puts(percentage,$muldiv(%_time_elapsed_seconds%,$get(pbarLength),%_time_total_seconds%))
$puts(pbarProgress,$muldiv($get(percent),1000,1000))

$button(15,3,0,0,$get(pbarProgress),3,,,'Seek back by 10 seconds',)
$button($get(pbarProgress),3,0,0,$sub($get(pbarLength),$get(pbarProgress)),3,,,'Seek ahead by 10 seconds',)

Track Info Panel with ability to change font

Reply #733
Is there a way to add support for dynamical button position?

I want to make my progress clickable where the "already played area" acts as a seek back button and the other part, as a seek ahead button.

Right now, seek back button works, but not the other one. It seems to me the button width and height support dynamic values, but coordinates does not.

Here is my code:
Code: [Select]
$puts(pbarLength,996)
$puts(percentage,$muldiv(%_time_elapsed_seconds%,$get(pbarLength),%_time_total_seconds%))
$puts(pbarProgress,$muldiv($get(percent),1000,1000))

$button(15,3,0,0,$get(pbarProgress),3,,,'Seek back by 10 seconds',)
$button($get(pbarProgress),3,0,0,$sub($get(pbarLength),$get(pbarProgress)),3,,,'Seek ahead by 10 seconds',)


In the meantime, you could put the seek ahead button underneath the seek back button, have the seek ahead button span the entire bar.

Track Info Panel with ability to change font

Reply #734
^
Haven't thought about that, thanks bro.

Edit: Although I'd still like to know if my request is feasible.


Track Info Panel with ability to change font

Reply #736
Button bug: I have a large 300x300 button overlaying some artwork. The bug seems to be that when I open up the preferences foobar box if this box is over the button I can't click anything within it and the button essentially acts through it.

Track Info Panel with ability to change font

Reply #737
Button bug: I have a large 300x300 button overlaying some artwork. The bug seems to be that when I open up the preferences foobar box if this box is over the button I can't click anything within it and the button essentially acts through it.

Same here.  That could get REALY annoying if one had a lot of button area.

Track Info Panel with ability to change font

Reply #738
Feature Request  - TAG:APPEND

To add values to multi-value fields.

Track Info Panel with ability to change font

Reply #739
I'm testing a simple button\rating configuration using the following code:

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

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


The problem is that the code never gets loaded when I open foobar and start playing a track. The only
way to get it to work is to go into my trackinfo settings and click "ok". From there on out everything
works fine.

Is there something I'm missing to get trackinfo to load my script when foobar fires up?

Thanks for any tips!

Track Info Panel with ability to change font

Reply #740
When you click on the button and the sorting context menu comes up, one choice in the context menu is "Reset", which resets the $sorted(field) values and brings back all of the original choices of fields to sort by (when you sort by artist, it goes away after).  Why couldn't you have all of the choices (eg Artist, Album,etc) remain in the context menu after sorting by them, and adjust the values of $sorted(field) with each sorting selection?


why would you need the choices after you've used it? eg you can's sort by "artist" twice. There's another way you can sort which may be what you're after.

Code: [Select]
$button2(2,8,0,0,18,24,'$font(Wingdings 3,12,,0-0-0)u','$font(Wingdings 3,12,,255-0-0)u','FILTER:source|!source!',)

$if($filtered(genre),
$alignabs(20,2,40,16,left,top)$font(calibri,9,underline,0-0-0)genre
$alignabs(20,16,40,16,left,top)$font(,,,)$filtered(genre)
,
$button2(20,2,0,0,40,16,'$font(calibri,9,,0-0-0)genre','$font(calibri,9,,255-0-0)genre','FILTER:genre|%genre%',)
)

$if($sorted(album),
$button2(62,4,0,0,20,16,'$font(Wingdings 3,9,,255-0-0)q$font(calibri,9,,255-0-0)$sorted(album)','$font(Wingdings 3,9,,0-0-0)q$font(calibri,9,,255-0-0)$sorted(album)','SORT:album|%album%',)
,
$button2(62,4,0,0,20,16,'$font(Wingdings 3,9,,0-0-0)q','$font(Wingdings 3,9,,255-0-0)q','SORT:album|%album%',)
)


$if($filtered(decade),
$alignabs(86,2,40,16,left,top)$font(calibri,9,underline,0-0-0)decade
$alignabs(86,16,40,16,left,top)$font(,,,)$filtered(decade)
,
$button2(86,2,0,0,40,16,'$font(calibri,9,,0-0-0)decade','$font(calibri,9,,255-0-0)decade','FILTER:decade|$mul($div(%date%,10),10)',)
)

$if($sorted(date),
$button2(128,4,0,0,20,16,'$font(Wingdings 3,9,,255-0-0)q$font(calibri,9,,255-0-0)$sorted(date)','$font(Wingdings 3,9,,0-0-0)q$font(calibri,9,,255-0-0)$sorted(date)','SORT:date|%date%',)
,
$button2(128,4,0,0,20,16,'$font(Wingdings 3,9,,0-0-0)q','$font(Wingdings 3,9,,255-0-0)q','SORT:date|%date%',)
)


$if($filtered(composer),
$alignabs(152,2,50,16,left,top)$font(calibri,9,underline,0-0-0)composer
$alignabs(152,16,50,16,left,top)$font(,,,)$filtered(composer)
,
$button2(152,2,0,0,50,16,'$font(calibri,9,,0-0-0)composer','$font(calibri,9,,255-0-0)composer','FILTER:composer|%composer%',)
)

$if($sorted(composer),
$button2(204,4,0,0,20,16,'$font(Wingdings 3,9,,255-0-0)q$font(calibri,9,,255-0-0)$sorted(composer)','$font(Wingdings 3,9,,0-0-0)q$font(calibri,9,,255-0-0)$sorted(composer)','SORT:composer|%composer%',)
,
$button2(204,4,0,0,20,16,'$font(Wingdings 3,9,,0-0-0)q','$font(Wingdings 3,9,,255-0-0)q','SORT:composer|%composer%',)
)


Quote
5-Function to calculate the of number of lines of text resulting from word wrapping of given text (helpful for adjusting display to match different sized fields)


you can use $calcheight then divide by the font size.

Is there a way to add support for dynamical button position?

I want to make my progress clickable where the "already played area" acts as a seek back button and the other part, as a seek ahead button.

Right now, seek back button works, but not the other one. It seems to me the button width and height support dynamic values, but coordinates does not.

Here is my code:
Code: [Select]
$puts(pbarLength,996)
$puts(percentage,$muldiv(%_time_elapsed_seconds%,$get(pbarLength),%_time_total_seconds%))
$puts(pbarProgress,$muldiv($get(percent),1000,1000))

$button(15,3,0,0,$get(pbarProgress),3,,,'Seek back by 10 seconds',)
$button($get(pbarProgress),3,0,0,$sub($get(pbarLength),$get(pbarProgress)),3,,,'Seek ahead by 10 seconds',)


buttons have to be // PerTrack so you can't have buttons depend of // PerSecond variables. I will try to add button support to the // PerSecond section for the next version.

Ah yea, I didn't realise about the #. Any chance of this being fixed in a future version, or not do-able?


yes, eventually.

Button bug: I have a large 300x300 button overlaying some artwork. The bug seems to be that when I open up the preferences foobar box if this box is over the button I can't click anything within it and the button essentially acts through it.


the preferences buttons don't work or the trackinfo buttons?

I'm testing a simple button\rating configuration using the following code:

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

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


The problem is that the code never gets loaded when I open foobar and start playing a track. The only
way to get it to work is to go into my trackinfo settings and click "ok". From there on out everything
works fine.

Is there something I'm missing to get trackinfo to load my script when foobar fires up?

Thanks for any tips!


for relative paths start with a "/" character... eg "/images\trackinfo\rating$get(rating).png", etc.

Track Info Panel with ability to change font

Reply #741
Quote
you can use $calcheight then divide by the font size.

That's the first thing I tried, but $calcheight only calculates the height before word wrapping; wrapped text still returns only the height of the individual letters.

Quote
the preferences buttons don't work or the trackinfo buttons?

The bug is that buttons are overlayed over the preferences window, so that you can accidentally activate the info pannel button when clicking on the preferences window.


 

Track Info Panel with ability to change font

Reply #743
The problem is that the code never gets loaded when I open foobar and start playing a track. The only
way to get it to work is to go into my trackinfo settings and click "ok". From there on out everything
works fine.

Is there something I'm missing to get trackinfo to load my script when foobar fires up?

Thanks for any tips!


I've experienced the same problem before, when I changed from foobar 0.9.3 to 0.9.4.1.
Try to remove your foobar shortcuts and create new ones. It works for me.

Track Info Panel with ability to change font

Reply #744

The problem is that the code never gets loaded when I open foobar and start playing a track. The only
way to get it to work is to go into my trackinfo settings and click "ok". From there on out everything
works fine.

Is there something I'm missing to get trackinfo to load my script when foobar fires up?

Thanks for any tips!


I've experienced the same problem before, when I changed from foobar 0.9.3 to 0.9.4.1.
Try to remove your foobar shortcuts and create new ones. It works for me.



Thanks for the responses. Turns out it was the relative paths in the button image parameters as terrestrial suggested. Works great now.

Thanks again!

Track Info Panel with ability to change font

Reply #745
It seems that there are a variety of issues regarding the refresing of the display.  In that light, it would be handy to have a command to refresh the display that can be executed through either a button or a keyboad shortcut.

This is a great plugin that completely revolutionizes what a Foobar setup can be and opens up the door to almost limitless customization.  I can't wait till I have the time to really get into it and put together a nice setup! 

Track Info Panel with ability to change font

Reply #746
I haven't been following the button/button2 functions too close. My question... Is it possible to have a toggle display? For example if I want to toggle %playback_time% and  %playback_time_remaining% in the same place with a left mouseclick, is that possible? I hope it's understandable what I mean.

Track Info Panel with ability to change font

Reply #747
I haven't been following the button/button2 functions too close. My question... Is it possible to have a toggle display? For example if I want to toggle %playback_time% and  %playback_time_remaining% in the same place with a left mouseclick, is that possible? I hope it's understandable what I mean.

You could certainly have the regular text and mousover text be different, but as far as I know, only SORT, FILTER, and Main and Context menu commands are possible with left clicking on buttons.  I actually tried for you using a function that changes the value of a variable, which would in turn effect the text displayed, but to no avail.

So no, I'm pretty sure there is currently no way to do that.

Track Info Panel with ability to change font

Reply #748

I haven't been following the button/button2 functions too close. My question... Is it possible to have a toggle display? For example if I want to toggle %playback_time% and  %playback_time_remaining% in the same place with a left mouseclick, is that possible? I hope it's understandable what I mean.

You could certainly have the regular text and mousover text be different, but as far as I know, only SORT, FILTER, and Main and Context menu commands are possible with left clicking on buttons.  I actually tried for you using a function that changes the value of a variable, which would in turn effect the text displayed, but to no avail.

So no, I'm pretty sure there is currently no way to do that.

EDIT: Never mind. Doesn't work with // PerSecond anyway.

Track Info Panel with ability to change font

Reply #749
I am trying to get the rotate flip working...
$imageabs2(100,100,,,,,0,200,C:\Documents and Settings\xxxx\Application Data\foobar2000\data\misc images\nocover.png,NOKEEPASPECT,rotateflip-2)

but it just makes the image dissapear - any idea what i am doing wrong?