Track Info Panel with ability to change font, Split from foo_uie_trackinfo |
![]() ![]() |
Track Info Panel with ability to change font, Split from foo_uie_trackinfo |
Jul 31 2006, 21:31
Post
#26
|
|
|
Group: Members Posts: 100 Joined: 8-February 02 Member No.: 1288 |
the latest stable, yes (0.9.2)
|
|
|
|
Jul 31 2006, 22:41
Post
#27
|
|
![]() Group: Members Posts: 680 Joined: 11-July 03 From: Brno, Czech Rep. Member No.: 7705 |
i've been playing with the new version and found out some more hidden features
![]() 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. This post has been edited by mazy: Jul 31 2006, 22:52 -------------------- info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987 |
|
|
|
Jul 31 2006, 23:05
Post
#28
|
|
![]() Group: Members Posts: 496 Joined: 22-October 04 From: Southern NJ Member No.: 17776 |
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" |
|
|
|
Jul 31 2006, 23:28
Post
#29
|
|
![]() Group: Members Posts: 680 Joined: 11-July 03 From: Brno, Czech Rep. Member No.: 7705 |
ok, so here goes the 'align' post
CODE 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: ![]() explanation (?): let's look at the first block. it's result is on the first line in the screenshot, rendered with light colors. you can see only dark-green "center" in there, as it got over the light one. "left" got put after "text", as the latter was already there and "left" was not allowed to draw over it. then we have "center", which was correctly put in the center. now "right" (the light one) is interesting. it's not on the right side as it should be, but rather at what seems to be right edge of the center column. strange. these "l", "c" and "r" letters are just new lines of the sub-blocks of the first block; they show more precisely where the alignment line is. now the second block. that's the one resulting to words rendered with darker colors. as you can see, that $align(,bottom) has no effect to it and $align functions in the second block assume "top" for the missing vertical alignment parameter (which is fine by me, it wasn't said to be "relative" or anything like that). they show in the left, right and center columns on the first line respectively. they do not overdraw the existing texts (as they are not allowed to) with the only exception being "center" - it seems that center of a center is again the same center 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. This post has been edited by mazy: Jul 31 2006, 23:45 -------------------- info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987 |
|
|
|
Aug 1 2006, 04:06
Post
#30
|
|
![]() Group: Members Posts: 102 Joined: 5-May 06 From: Minneapolis, MN Member No.: 30448 |
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. This post has been edited by rouge: Aug 1 2006, 04:08 |
|
|
|
Aug 1 2006, 04:36
Post
#31
|
|
|
Group: Members Posts: 43 Joined: 16-March 05 Member No.: 20683 |
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... |
|
|
|
Aug 1 2006, 06:13
Post
#32
|
|
|
Group: Members Posts: 964 Joined: 10-June 06 Member No.: 31716 |
I second the configurable double click behavior.
|
|
|
|
Aug 1 2006, 07:36
Post
#33
|
|
|
Group: Members Posts: 274 Joined: 24-July 06 Member No.: 33259 |
QUOTE I've been playing with the new version and found out some more hidden features nice detective work ------------ 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. |
|
|
|
Aug 1 2006, 07:44
Post
#34
|
|
|
Group: Members Posts: 43 Joined: 16-March 05 Member No.: 20683 |
Oh! Can you do everything? I'll wait forerver...^^
|
|
|
|
Aug 1 2006, 09:42
Post
#35
|
|
|
Group: Members Posts: 218 Joined: 1-April 04 Member No.: 13171 |
Thanks a lot for your work
CODE $alignabs(X,Y,W,H,H,V) %_width% %_height% $calcwidth(TEXT) $calcheight(TEXT) those are a great improvement |
|
|
|
Aug 1 2006, 11:22
Post
#36
|
|
|
Group: Members Posts: 238 Joined: 20-March 06 Member No.: 28640 |
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. |
|
|
|
Aug 1 2006, 12:04
Post
#37
|
|
![]() Group: Members Posts: 680 Joined: 11-July 03 From: Brno, Czech Rep. Member No.: 7705 |
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: ![]() first start with 3. using the new measurement features coupled with #SHADE#, one can make nice pixel-accurate trackbar. code: CODE $alignabs(0,0,%_width%,$mul(%_height%,2),,)#SHADE# $alignabs($muldiv(%playback_time_seconds%,$sub(%_width%,10), %length_seconds%),0,10,$mul(%_height%,2),,)#SHADE# note: you may have to adjust font size to fit the trackbar into panel vertically (or make it span over the whole height). i could do that in the code, but that would have to do pixel<->point conversion and i was lazy to do that let's move to 2a. it's $alignrel test, 2b has the first line in the code bellow uncommented: CODE //$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 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 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 ... This post has been edited by mazy: Aug 1 2006, 21:21 -------------------- info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987 |
|
|
|
Aug 1 2006, 18:13
Post
#38
|
|
![]() Group: Members Posts: 1535 Joined: 8-May 06 Member No.: 30546 |
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. |
|
|
|
Aug 1 2006, 18:21
Post
#39
|
|
|
Group: Members Posts: 274 Joined: 24-July 06 Member No.: 33259 |
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 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 //$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 //$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 |
|
|
|
Aug 1 2006, 18:58
Post
#40
|
|
|
Group: Members Posts: 33 Joined: 7-November 05 From: Lyon, France Member No.: 25625 |
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. |
|
|
|
Aug 1 2006, 19:05
Post
#41
|
|
![]() Group: Members Posts: 1535 Joined: 8-May 06 Member No.: 30546 |
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. |
|
|
|
Aug 1 2006, 19:21
Post
#42
|
|
![]() Group: Members Posts: 1535 Joined: 8-May 06 Member No.: 30546 |
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 $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) ) This post has been edited by Yotsuya: Aug 1 2006, 19:21 |
|
|
|
Aug 1 2006, 19:41
Post
#43
|
|
|
Group: Members Posts: 274 Joined: 24-July 06 Member No.: 33259 |
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. |
|
|
|
Aug 1 2006, 19:55
Post
#44
|
|
|
Group: Members Posts: 33 Joined: 7-November 05 From: Lyon, France Member No.: 25625 |
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 |
|
|
|
Aug 1 2006, 23:22
Post
#45
|
|
|
Group: Members Posts: 218 Joined: 1-April 04 Member No.: 13171 |
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 $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 |
|
|
|
Aug 1 2006, 23:30
Post
#46
|
|
|
Group: Members Posts: 1 Joined: 1-August 06 Member No.: 33507 |
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? |
|
|
|
Aug 1 2006, 23:49
Post
#47
|
|
![]() Group: Members Posts: 1535 Joined: 8-May 06 Member No.: 30546 |
see mazy's post below. This post has been edited by Yotsuya: Aug 2 2006, 00:10 |
|
|
|
Aug 1 2006, 23:58
Post
#48
|
|
![]() Group: Members Posts: 680 Joined: 11-July 03 From: Brno, Czech Rep. Member No.: 7705 |
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,) -------------------- info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987 |
|
|
|
Aug 2 2006, 07:37
Post
#49
|
|
|
Group: Members Posts: 218 Joined: 1-April 04 Member No.: 13171 |
@ mazy
thanks for your explanations |
|
|
|
Aug 2 2006, 08:01
Post
#50
|
|
|
Group: Members Posts: 550 Joined: 24-April 03 From: Italy Member No.: 6159 |
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) This post has been edited by mobyduck: Aug 2 2006, 08:04 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 05:06 |