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

Track Info Panel with ability to change font

Reply #25
the latest stable, yes (0.9.2)

Track Info Panel with ability to change font

Reply #26
i've been playing with the new version and found out some more hidden features . i apologize in advance, as these are probably just proof-of-concept features which are not meant to be used by users at the moment. i've found about them looking at the binary (as i couldn't make $alignrelative work). interesting stuff though. behold:



edit: i've realized that this screenshot isn't 100% correct, #endshade# doesn't work atm, so #shade# changes background only of the current line (which in the case on the screenshots is rather long and spans over two "render lines").

as for other things, well the recent changes to the way $align works are a bit confusing to me. with the old (= overlapping blocks) version, it seemed more straightforward. i will post screenshots later.

also $alignrelative isn't working for me, i have even tried to use #align-rel# or #align-set# to no avail.

$rgb() seems to reset to black instead to the default text color.

Track Info Panel with ability to change font

Reply #27
are you guys running the latest version of foobar (0.9x)?

I am running the very latest (FB2K_v0.9.3b4). My work computer does not have the latest .Net installed, so I may not have the msvcr80.dll file installed. I am on my home computer at the moment. Tomorrow, I will copy that file from my home computer over to my work computer and see if that does the trick. Thank you for your quick reply.
Surf's Up!
"Columnated Ruins Domino"

Track Info Panel with ability to change font

Reply #28
ok, so here goes the 'align' post . formatting:

Code: [Select]
text$char(10)
// first block
$align(left,)$rgb(200,50,50)left$char(10)l
$align(center,)$rgb(50,200,50)center$char(10)c
$align(right,)$rgb(50,50,200)right$char(10)r
// this has no effect to the second block
$align(,bottom)
// second block
$align(left,)$rgb(100,0,0)left
$align(right,)$rgb(0,0,100)right
$align(center,)$rgb(0,100,0)center
// third block
$align(left,bottom)$rgb(200,50,50)left
$align(right,bottom)$rgb(50,50,200)right
$align(center,bottom)$rgb(50,200,50)center
result:

.

it gets interesting again for the last, third block. i've only changed the order in which i specify texts for corresponding columns. i put right in front of center - and the result is what one would expect in the other blocks too - right column has adjustment line on the right edge of the panel.

Track Info Panel with ability to change font

Reply #29
Can this be made into a seperate component from foo_uie_infopanel?

In case people want to use a mix of modified and unmodified info panels.

edit:  This appears to be possible, but there is no difference in the layout names, so you wouldn't be able to tell which is which.  And my old infopanels were automatically converted to the moded ones upon installation.

Track Info Panel with ability to change font

Reply #30
Great works!

Some suggestions...somewhat irrelevant with your mod.

1. show foobar volume, playback order.
2. combine album art...
3. double-click behavior configure.

Is these possible? or shoud be just my dream...

Track Info Panel with ability to change font

Reply #31
I second the configurable double click behavior.

Track Info Panel with ability to change font

Reply #32
Quote
I've been playing with the new version and found out some more hidden features


nice detective work  most of the "hidden" stuff is still untested/incomplete, so be careful, but there are some that are pretty much done.

------------

fixed the problem with alignrelative, and renamed to $alignrel
also fixed the $rgb() problem

fixed the alignment problem (caused by that center column). it should work now.

if you don't specify a parameter for $align (eg $align(left,)) the blank either default to top or left.

------

If will try to change it into a separate dll from foo_uie_trackinfo so that you can run both at the same time for the next version.

-----

Quote
Some suggestions...somewhat irrelevant with your mod.


I think I can do #1. #2 is low down on the todo list. #3 also, but first I want to fix the basic formatting stuff

-------

I've uploaded a new version, with the aforementioned bug fixes + some new commands (including one to measure length). Please see the readme for more details.

Track Info Panel with ability to change font

Reply #33
Oh! Can you do everything? I'll wait forerver...^^

Track Info Panel with ability to change font

Reply #34
Thanks a lot for your work
Code: [Select]
$alignabs(X,Y,W,H,H,V)
%_width%
%_height%
$calcwidth(TEXT)
$calcheight(TEXT)

those are a great improvement 

Track Info Panel with ability to change font

Reply #35
just wanted to thank you (creator of new features), no time in the moment going to wacken festival soon. so trying to get into it next week.

seems really (!!!!) nice work to me.

Track Info Panel with ability to change font

Reply #36
terrestrial, i can confirm that $rgb() works and that center column alignment problem is gone! the new features summed by Hamallainen are great .

now i have something new for us. picture:

.

let's move to 2a. it's $alignrel test, 2b has the first line in the code bellow uncommented:

Code: [Select]
//$alignrel(left,top)
<line1>
$char(10)
<line 2>
$alignrel(center,top)<line 2 center>
$alignrel(right,top)<line 2 right>
$char(10)<line3>
$alignrel(left,top)<line 3 left>
we can see in the first example, that until <line 3 left> it works as one would expect. now if we uncomment the first line with the $alignrel (which is set to default values), things get messy starting from <line 2 center>. my guess is that $alignrel doesn't work correctly with multiline blocks. it does as long as there's no $alignrel before, otherwise it takes that as reference point. i think this is a bug.

example no. 1, is extended one from my previous post. you can see there's no longer that center column alignment problem. there are some interesting observations to note, though.

in the top-left corner, there are two major multiline blocks. one has lines with "left", "l" and "longer left"; the other has 4 lines with one underscore character each. interesting is that the underscore on the second line is not directly alongside that "l" and similarly dark-red "left" to the light one on the first line.

my explanation is that this is rather good feature of multiline blocks. whenever blocks spans over multiple lines, the edge of its longest line (or rather the line with most major "adjustment point"), in this case the third line "longer left", affects neighbours of this block on its every line. it basically creates columns, but only affecting the lines that block spans over (that's why the 4. underscore is directly to the left panel's edge).

another feature demonstrated is the $alignabs. at first please note those two light-blue underscores on the right edge (second sub-block of 5. block in the code). these are part of multiline block positioned with $alignabs, so they do not "flow" with other text there and overwrite "right" and "r". i used the "shortcut" 2-parameter version of $alignabs, as that's basically version of $align without overwriting text check.

the full $alignabs(x,y,width,height,halign,valign) is demonstrated by the rectangles with "absolute" text. in this case, x, y, width and height define rectangle which is used as boundaries for following text, and halign plus valign control this text's positioning inside that rectangle. #SHADE# came handy in here, is it allowed for showing width of these rectangles.

you can see that $alignabs supports negative coordinates and also that it shows even if part of the rectangle is outside panel's boundaries. this is all good news . i have one feature request though: it would be nice if $alignabs(x,y,,,halign,valign) - i.e. without width and/or height specified - substitutes these omitted parameters with values equal to that block's width / height.

there's another thing to mention regarding this example. only text blocks aligned with $align(,top) do not overwrite other text. you can see that capital letters "L", "C" and "R" overwrite "left", "center" and "right" respectively. all these blocks have "middle" vertical alignment.

code:

Code: [Select]
text$char(10)
// 1. block
$align(left,)$rgb(200,50,50)left$char(10)l$char(10)longer left
$align(center,)$rgb(50,200,50)center$char(10)c
$align(right,)$rgb(50,50,200)right$char(10)r
// has no effect on 2. block
$align(,bottom)
// 2. block
$align(left,)$rgb(100,0,0)left
$align(right,)$rgb(0,0,100)right
$align(center,)$rgb(0,100,0)center
// 3. block
$align(left,middle)$rgb(200,50,50)left
$align(right,middle)$rgb(50,50,200)right
$align(center,middle)$rgb(50,200,50)center
// 4. block
$align(left,middle)$rgb(200,50,50)L
$align(right,middle)$rgb(50,50,200)R
$align(center,middle)$rgb(50,200,50)C
// 5. block
$align(left,top)$rgb(255,100,100)_$char(10)_$char(10)_$char(10)_
$alignabs(right,top)$rgb(100,100,255)_$char(10)_
// 6. block
$alignabs(-30,80,70,16,center,middle)#SHADE#absolute
$alignabs(100,80,70,16,center,middle)#SHADE#absolute
$alignabs(140,80,70,16,center,middle)#SHADE#absolute
$alignabs(260,80,45,15,center,middle)#SHADE#absolute
// 7. block
$alignabs(100,96,200,16,,)"absolute" is
$calcwidth(absolute) x $calcheight(absolute) pixels
[edit] colors and some syntax. my computer went down while i was editing this post, and i wasn't able to get it running until now :/. i should buy new harddrive for my system ...

Track Info Panel with ability to change font

Reply #37
Thank you terrestrial for your dedication, this component is evolving quickly. At this time all my issues have been resolved and I have happily migrated to your version of this panel.  The only things I have left are feature requests:

1) I would like to be able to use $font() without any parameters to set the current font to the default font. And for that matter an $align() without parameters to reset the alignment to the upper left corner would probably be useful too.

2) Ability to export and import settings of a panel including "Font", "Colours", "Display options", and "Formatting string" to an external file would assist tremendously when redesigning layouts or sharing configurations.

3) Text that can be clicked on to start events such as URL's from online radio.  This has been mentioned before and would obviously take quite a bit of work so I dont expect to see it anytime soon.

4) Defining a background bitmap or embedding graphic sources such as icons inline with text would be icing on the cake.  When combined with request #3 this would provide a pleasant alternative to the default buttons toolbar (which I've heard has many problems under Win2k).

I would like to particularly thank you for providing the functions for analyzing pixel length of strings and the panel itself, when used properly these allow us to develop panels that dynamically resize the text based on the panel's size. I'd also like to thank you for resolving the $rgb()$font() conflict and $align() bugginess, the component is much more flexible.

Track Info Panel with ability to change font

Reply #38
Quote
first start with 3. using the new measurement features coupled with #SHADE#, one can make nice pixel-accurate trackbar. code:

nice! I didn't even think about that  I think I need to add the ability to add picture now

Quote
we can see in the first example, that until <line 3 left> it works as one would expect. now if we uncomment the first line with the $alignrel (which is set to default values), things get messy starting from <line 2 center>. my guess is that $alignrel doesn't work correctly with multiline blocks. it does as long as there's no $alignrel before, otherwise it takes that as reference point. i think this is a bug.

this code

Code: [Select]
//$alignrel(left,top)
<line1>
$char(10)
<line 2>
$alignrel(center,top)<line 2 center>
$alignrel(right,top)<line 2 right>
$char(10)<line3>
$alignrel(left,top)<line 3 left>

get automatically converted to

Code: [Select]
//$alignrel(left,top)
$alignrel(left,top)<line1>
$alignset()$alignrel(left,top)
<line 2>
$alignrel(center,top)<line 2 center>
$alignrel(right,top)<line 2 right>
$char(10)<line3>
$alignrel(left,top)<line 3 left>

with the first line not commented out, the automatic conversion doesn't happen (it doesn't happen after the first $align), so if you change the subsequent $char(10)s to $alignset()$align(left,top) it should work.

Quote
my explanation is that this is rather good feature of multiline blocks. whenever blocks spans over multiple lines, the edge of its longest line (or rather the line with most major "adjustment point"), in this case the third line "longer left", affects neighbours of this block on its every line. it basically creates columns, but only affecting the lines that block spans over (that's why the 4. underscore is directly to the left panel's edge).

exactly right.. the new text should "flow" around the obstruction. It's useful when you have a small "box" of text that you want your main text to flow around.

Quote
it would be nice if $alignabs(x,y,,,halign,valign) - i.e. without width and/or height specified - substitutes these omitted parameters with values equal to that block's width / height.

do you mean substitute the total display width, height (%_width%, %_height%) or something else?

Quote
only text blocks aligned with $align(,top) do not overwrite other text.

correct also  block detection / avoidance for middle and bottom aren't written yet (eventually...)

Track Info Panel with ability to change font

Reply #39
Another feature request: Can you create $font(NAME,SIZE,OPTIONS,COLOR) generator as you do with the color (e.g.: 000000)?, We just need a standart font box with as output  the $font() syntax ready to cut'n'paste

At least could you update the ""color generator" to create color with the the new rgb (e.g.: $rgb() ) syntax?.

Thank you very much for your very good work.

Track Info Panel with ability to change font

Reply #40
I stumbled upon a small inconsistency.

$align(left,)$repeat( ,4)text
$align(right,)text$repeat( ,4)

The right alignment will strip any spaces at the end of text, while the left alignment does not strip any spaces at the beginning of text.  I would prefer if the right alignment would allow for spaces, but either way I think the functions should act similarly.

Track Info Panel with ability to change font

Reply #41
I know a lot of people out there are using trackinfo code that uses $progress2() to create a stylized progress bar.  Well I modified mine to auto-resize with the panel and thought I'd share the code. Change $rgb() and $char() values to suit your tastes, the 5th line is key:

Code: [Select]
$align(center,bottom)
$progress2(
%playback_time_seconds%,
%length_seconds%,
$sub($div(%_width%,$calcwidth($char(9679))),1),
$rgb(0,128,255)$char(9679),
$rgb(0,0,202)$char(9679)
)

Track Info Panel with ability to change font

Reply #42
Quote
1) I would like to be able to use $font() without any parameters to set the current font to the default font. And for that matter an $align() without parameters to reset the alignment to the upper left corner would probably be useful too.


added.

Quote
2) Ability to export and import settings of a panel including "Font", "Colours", "Display options", and "Formatting string" to an external file would assist tremendously when redesigning layouts or sharing configurations.


already on the todo list, but may take a while

Quote
3) Text that can be clicked on to start events such as URL's from online radio. This has been mentioned before and would obviously take quite a bit of work so I dont expect to see it anytime soon.


I should be able to do this after I add in images. I may have a version that can do images today, but buttons may take a couple of days.

Quote
Can you create $font(NAME,SIZE,OPTIONS,COLOR) generator as you do with the color (e.g.: 000000)?, We just need a standart font box with as output the $font() syntax ready to cut'n'paste


This should be doable.

Quote
At least could you update the ""color generator" to create color with the the new rgb (e.g.: $rgb() ) syntax?.


The old syntax should work fine (eg. 000000 = rgb(0,0,0) and both will be recognized).

Quote
The right alignment will strip any spaces at the end of text, while the left alignment does not strip any spaces at the beginning of text. I would prefer if the right alignment would allow for spaces, but either way I think the functions should act similarly.


spaces to the right of words are counted as insignificant because word breaks, etc are calculated from there, so I think it may be better to also strip out spaces from the beginning. You should be able to use non-breaking spaces (not sure what the char code for this is) to achieve what you want though.

Track Info Panel with ability to change font

Reply #43
Quote
At least could you update the ""color generator" to create color with the the new rgb (e.g.: $rgb() ) syntax?.


The old syntax should work fine (eg. 000000 = rgb(0,0,0) and both will be recognized).



I know but i just don't want to do the hexadecimal->decimal conversion to retrieve the "rgb" of the color. And I think it's more consistant with fb2k 0.9

Track Info Panel with ability to change font

Reply #44
Hi,

I have a problem with the $align(H,V) fonction. If someone could confirm please. ( I use 0.9.3 beta4)

Here is the code i use, to explain:
Code: [Select]
$if(%_trackinfo_notrack%,
,
$align(left,top)$font(tahoma,16,,0-0-0)$repeat(7,12)
$align(center,top)$font(tahoma,16,,255-0-0)$repeat(8,12)
$align(right,top)$font(tahoma,16,,0-255-0)$repeat(9,12)

$align(left,middle)$font(tahoma,16,,0-0-255)$repeat(4,12)
$align(center,middle)$font(tahoma,16,,255-255-0)$repeat(5,12)
$align(right,middle)$font(tahoma,16,,0-255-255)$repeat(6,12)

$align(left,bottom)$font(tahoma,16,,255-0-255)$repeat(1,12)
$align(center,bottom)$font(tahoma,16,,128-128-255)$repeat(2,12)
$align(right,bottom)$font(tahoma,16,,255-128-128)$repeat(3,12)
)

and a screenshot:


It's seems $align(*,top) behave differently than $align(*,middle) and $align(*,bottom)
Well it seems $align(*,middle) and $align(*,bottom) overlap text if it's too long while $align(*,top) do not overlap but "discard" text. I don't know which one is the intended behaviour. I think both behaviour are interesting and that would be great if we could have access to both with for example $align(H,V) for no overlap and $aligno(H,V) for overlap.

thanks

Track Info Panel with ability to change font

Reply #45
This may be a stupid question, but I'm fairly new to foobar and I can't find it documented anywhere.  But anyway, here goes nothin':

Is there a modifier that would make all of the text affected by the font statement display using capital characters?

 

Track Info Panel with ability to change font

Reply #46
Shakedown I believe the function you are looking for is $upper().  This is the wrong thread and is not handled by $font(). Please refer to your C:\Program Files\foobar2000\titleformat_help.html

see mazy's post below.

Track Info Panel with ability to change font

Reply #47
It's seems $align(*,top) behave differently than $align(*,middle) and $align(*,bottom)
Well it seems $align(*,middle) and $align(*,bottom) overlap text if it's too long while $align(*,top) do not overlap but "discard" text. I don't know which one is the intended behaviour. I think both behaviour are interesting and that would be great if we could have access to both with for example $align(H,V) for no overlap and $aligno(H,V) for overlap.

yes, you're right. you could read my and terrestrial's posts as there's lot of information how this works, but i reckon that it's lots of information .

in short - only $align(*,top) avoids to overwrite text and "flows" it. this is probably going to change, this is simply work-in-progress and there's only anti-overlapping code for the top scenario.

as for the other question you've asked - there's already way to output text without overlap checking. you can use $alignabs. it's more complex function which allows for positioning block of text anywhere you want, with the ability to specify it's box and vertical / horizontal alignment inside that box. the syntax is $alignabs(x,y,width,height,halign,valign). there's also shortcut version which is similar to $align - $alignabs(halign,valign).


Shakedown, Yotsuya is right, but there's also hidden feature in this plugin. you can use "uppercase" or "lowercase" directly in the $font statement, in the style parameter. example: $font(,,bold uppercase,)

Track Info Panel with ability to change font

Reply #48
@ mazy
thanks for your explanations

Track Info Panel with ability to change font

Reply #49
Ok, my turn for a stupid question: how do I add a blank line? It looks like multiple $char(10) are ignored and treated as one. The same happens if the text I display contains carriage returns.

Note that I had the same problem with the "other" trackinfo plugin.

Regards.

Alessandro

[Edit]Using foobar v0.9.2 and foo_uie_trackinfo_mod v0.8 (1-AUG-2006)