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

Track Info Panel with ability to change font

Reply #225
derrrrr i feel retarded, thank you.

Track Info Panel with ability to change font

Reply #226
unabatedshagie - i'm not really using it in my main foobar, only testing it for time being. my testing foobar looks like this right now:



Squeller - you can put the old track info panel or the mod (and rename it's dll) back and recover these settings. the new version (as mentioned in the readme and in my previous post) is distinct from the old one and doesn't take over its settings.

as for images - well 32-bit pngs with alpha channel work here, i think that bmps with 256-color palette should work too. imho what you're experiencing is that refresh / update problem i've mentioned. try using the formatting snippet i've posted above.



Mazy can you please give me a code sample where you have the large pale background text and then other text infront... with the overlay... I have any like this but all this new coding is very trickey for me to work out...

I wish this had a drag and drop gui interface would make much easier...

Track Info Panel with ability to change font

Reply #227
Code: [Select]
$alignabs(0,0,%_width%,%_height%,left,top)
$font(Lucida Sans Unicode,30,bold,224-223-227)Back

$alignabs(0,0,%_width%,%_height%,right,top)
$font(Lucida Sans Unicode,30,bold,224-223-227)ground


$alignabs(0,20,%_width%,%_height%,center,top)
$font(Lucida Sans Unicode,15,boldglow-,)$rgb(255,255,255)Foreground
Maybe this and the Wiki will help you to figure out how it works ...??

Track Info Panel with ability to change font

Reply #228
Is it perhaps because the length of the text to be shown expands the Panel's size ...

Strange, this was the problem but it still applies when using the %path% tag. For instance, when using something like this $directory(%path%,4) the output is usually just "Music" folder and is short and should appear no matter what. However if %path% is too long for the panel, even though it itself is not being used, then nothing shows at all.

Track Info Panel with ability to change font

Reply #229
Did u try the $alignabs-"solution" , I posted there ...??

If it works then, perhaps put a "#SHADE#" before the "$get(Text)"
... and see what happens  !!

Track Info Panel with ability to change font

Reply #230
thanks for the help sw!ng but right after I posted I worked out how to do it...
seems my problem now is after using a relative position on a horizontal line I want another word text type to appear on the same line with a tab spacing... ie so that if the first tag is longer it dynamically moves/shifts it to the right

at the momanet I have to user absolute values///
any ideas perhaps i can set an x position based on the length of thetag before or somethign like that

ok so how do i user the following functions to achieve what I want.
$calcwidth(Text1)
$calcheight(Text1)

------------
also i know that this version of track info doesnt have the elipses ending for lines of text that go to long so what should I do for when I have a track thats simply too long? at the moment its carrying over to the next line and stuffing everything up

*** UPDATE - fixed myself see the subsrt stuff pretty useful ***
-------------
Here is what I have come up with so far
Code: [Select]
// Info Color e.g. %tag%
$puts(info,$font(hooge 05_55 Cyr2,36,,75-115-150))

// Info Color e.g. "Title"
$puts(title,$font(arial,14,,21-38-58))

// Set Rating character
$puts(ratingchar,$font(wingdings,36,shadow,12-38-58)'«')
$puts(rating,$font(wingdings,36,shadow,245-245-245)'«')

$alignabs(1,,%_width%,%_height%,left,)$get(info)$if($greater(13,$len(%artist%)),%artist%,$substr(%artist%,1,14)...)
$alignabs(5,36,%_width%,%_height%,left,)$get(title)ARTIST
$alignabs(1,48,%_width%,%_height%,left,)$get(info)$if($greater(13,$len(%title%)),%title%,$substr(%title%,1,14)...)
$alignabs(5,84,%_width%,%_height%,left,)$get(title)SONG
$alignabs(1,96,%_width%,%_height%,left,)$get(info)$if($greater(13,$len(%album%)),%album%,$substr(%album%,1,14)...)
$alignabs(5,132,%_width%,%_height%,left,)$get(title)ALBUM
$alignabs(1,144,%_width%,%_height%,left,)$get(info)$if($greater(13,$len(%genre%)),%genre%,$substr(%genre%,1,14)...)
$alignabs(5,180,%_width%,%_height%,left,)$get(title)GENRE
//playcount
$alignabs(-1,144,%_width%,%_height%,right,)$get(info)%play_count%
$alignabs(-5,180,%_width%,%_height%,right,)$get(title)PLAYED
//Tracks
$alignabs(1,192,%_width%,%_height%,left,)
$get(info)%tracknumber%$if(%totaltracks%,$get(head)/$get(info)%totaltracks%,)
$alignabs(5,228,%_width%,%_height%,left,)$get(title)TRACKS
//Rating
$alignabs(1,240,%_width%,%_height%,left,)
$if(%rating%,$repeat($get(ratingchar),%rating%)
$repeat($get(rating),$sub(5,%rating%)),$repeat($get(rating),5))
$alignabs(5,276,%_width%,%_height%,left,)$get(title)RATING
//disc
$alignabs(-1,192,%_width%,%_height%,right,)$get(info)
$if($and(%discnumber%,%totaldiscs%), $get(head)[$get(info)%discnumber%][$get(head)/$ge

t(info)%totaldiscs%]$alignabs(-5,224,%_width%,%_height%,right,)$get(title)DISC,)


//year
$alignabs(-1,-3,%_width%,%_height%,right,bottom)$get(info)%date%
$alignabs(-5,0,%_width%,%_height%,right,bottom)$get(title)YEAR


Track Info Panel with ability to change font

Reply #231
Code: [Select]
$puts(XX,
50)

$puts(YY,
100)

$puts(Text1,
$font(Arial,10,boldshadow,)Text A)

$puts(Text2,
$font(Arial,10,boldshadow,)Text B)


$alignabs($get(XX),$get(YY),%_width%,%_height%,left,top)
$get(Text1) 

$alignabs($add($get(XX),$calcwidth($get(Text1)),15),$get(YY),%_width%,%_height%,left,top)
$get(Text2) 
And as a little BonBon for you (since you nearly fixed it by yourself) ...:
Code: [Select]
$ifgreater($len(%artist%),14,$left(%artist%,11)'...',%artist%)
(or werent you anoyed by those "..." even if the title was short ...??)

Track Info Panel with ability to change font

Reply #232
thanks for the assitance.. I supose your way is a little less typing...
now to try out the other code you provided for me

what do you think of my first go anyways?

Track Info Panel with ability to change font

Reply #233
This is an awesome change to the track info panel.  Does it only display images from a directory within the main fb2k program folder?  Or can you have a path to say the "folder.jpg" within the music folder on another drive?  Better yet, can it display album art embedded in a tag?

Thanks.

Edit....figuring I just saw the wiki....I have my answer.  So instead, are either of those two image options planned?  It would be cool to pull the image using %path%, so that one could pull the image from the music file's directory.  Essentially combining the album art and track info panels together.

Track Info Panel with ability to change font

Reply #234
I want to find out whether the full path contains a specific folder and then assign an image to show depending on the result. So if it's in the "to burn" folder, show a nero image for instance. The code I use is basically:

Code: [Select]
$if($strstr(%path%, 'burn'), YES, NO)


But this doesn't work.

Here's a fresh idea: Clickable items that can be assigned to foo_run or standard foobar actions. I have programmed a little alert image to show if the tags aren't complete - clicking this image could bring up the properties dialog (I have this on shortcut anyway but it's a neat idea).

Track Info Panel with ability to change font

Reply #235
first of all, there should be some sort of %_width% and %_height% which respect padding (and any parent frame like when using $alignabs).

when using $drawrect with 0 for width or height, it gets substituted for the maximal value respecting padding. imho this could make some things harder to make (see my progress bar example), as you can't draw with one dimension set to zero and expect it not to draw ... i think that zero should mean no width or height. you can substitute only missing parameters (i.e. not $drawrect(,,0,0,something), but $drawrect(,,,,something)).

another issue with $drawrect is that when using alpha blending by alpha-number like $drawrect(,,,,pencolor-0-0-0 alpha-80), it uses only pencolor to draw the rectangle. i would expect it to draw the rectangle as normal with both pencolor and brushcolor. or - to use brushcolor.

i really like that we can use system colors now, and i would like to see some other changes to the color system. for example when given only one value (like brushcolor-50 or $font(,,,50)) to interpret it as gray color (i.e. expand it to 50-50-50). also specifying alpha value as 4th color component would be nice (brushcolor-255-0-0-100).

padding. imho it should be relative to the actual frame. what i mean is that after using $alignabs to create new frame for text, $padding or $drawrect imho should relate to this frame. like $alignabs(10,10,10,10)$padding(1,1)$drawrect(,,,,brushcolor-0-0-0) should be the same as $drawrect(11,11,8,8,brushcolor-0-0-0). maybe you could add something like $drawrectabs.

anyway, sorry for my whining and *thank you* for this great plugin. p.s. i would like to be able to draw that progressbar for playing item in your foo_uie_single_column_playlist .


padding was just a quick hack to space text a bit better;) I will make the behavior more consistent though. And, you should be able to do that progressbar with the playlist now.

@terrestrial:
I know its unofficial, YET ... but:
Code: [Select]
$put(Title,%title%(#LINEHEIGHT,5#)$char(10)%title% )
like you said to do, is not working as expected...!!


try this:

Code: [Select]
$put(Title,%title%'#LINEHEIGHT,5#'$char(10)%title%)


Here's a fresh idea: Clickable items that can be assigned to foo_run or standard foobar actions. I have programmed a little alert image to show if the tags aren't complete - clicking this image could bring up the properties dialog (I have this on shortcut anyway but it's a neat idea).


Clickable buttons are on the todo list

Track Info Panel with ability to change font

Reply #236
I want to find out whether the full path contains a specific folder and then assign an image to show depending on the result. So if it's in the "to burn" folder, show a nero image for instance. The code I use is basically:

Code: [Select]
$if($strstr(%path%, 'burn'), YES, NO)


But this doesn't work.

Here's a fresh idea: Clickable items that can be assigned to foo_run or standard foobar actions. I have programmed a little alert image to show if the tags aren't complete - clicking this image could bring up the properties dialog (I have this on shortcut anyway but it's a neat idea).


Try instead of YES or NO, for yes put what command you wantt to execute, and then in place of no, what command you want to run, or put nothin so the next thing after it runs if it does not contain the words in the first if strstr match.

This will just work (as you probably already know) if 'burn' is contained in the path name. If you want put "to burn" to further guard against false postives. I believe it should work after that; though I suck at coding 

Track Info Panel with ability to change font

Reply #237
It only ever says NO though, how will putting in the image code work? Above is merely a test case and if that does not work then putting in the code never will.
But I tried it anyway:
Code: [Select]
$if($strstr(%path%, 'k'), $imageabs(10,10,images/star-1.png,),)

Does not work when it should, not even for a single character test.

Track Info Panel with ability to change font

Reply #238
FofR: have you tried removing the space in your $strstr() statement because I think it's being processed as part of the string to search for.

Track Info Panel with ability to change font

Reply #239
Questions:

1. Any plans to re-implement line ending modes?
    AT LEAST there should be a non wrapping mode.

2. Why did you again choose this strange syntax (e.g. #LINEHEIGHT,5#) instead of $function(args)?


 

Track Info Panel with ability to change font

Reply #241
hey. is there anyway to change the shadow color? when i use the option it only lets me use a black shadow

Track Info Panel with ability to change font

Reply #242
hey. is there anyway to change the shadow color? when i use the option it only lets me use a black shadow

just specify it after the shadow statement like this: shadow-r-g-b, where r-g-b part specifies color.

edit: seems i was wrong, that works only for glow. i will post more info about $font soon ...

Track Info Panel with ability to change font

Reply #243
$font examples:



tagz:

Code: [Select]
// framework
$drawrect(,,,,brushcolor-255-255-255 pencolor-null)$padding(5,5)
$puts(index,$font(,8,nocleartype glow- glowblur-0 glowexpand-1 fixedwidth-6,255-255-255))
$put(font,$font(Calibri,9,bold,100-100-100))
$font(,10,,)$alignrel(,)
$puts(code,$alignrel(right,)$get(font))
$puts(end,'#LINEHEIGHT,18##LINE,#'$char(10)'#LINEHEIGHT,5#' $char(10)$alignset()$alignrel(,))
// examples
$get(index) 1 
$font(,,bold italics underline strikeout,50-150-50)Testing String
$get(code)'$font(,,bold italics underline strikeout,50-150-50)'$get(end)
//
$get(index) 2 
$font(,,nocleartype,50-150-50)Testing String
$get(code)'$font(,,nocleartype,50-150-50)'$get(end)
//
$get(index) 3 
$font(,,uppercase,50-150-50)Testing String
$get(code)'$font(,,uppercase,50-150-50)'$get(end)
//
$get(index) 4 
$font(,,lowercase,50-150-50)Testing String
$get(code)'$font(,,lowercase,50-150-50)'$get(end)
//
$get(index) 5 
$font(,,textblur-5,50-150-50)Testing String
$get(code)'$font(,,textblur-5,50-150-50)'$get(end)
//
$get(index) 6 
$font(,,textalpha-128,50-150-50)Testing String
$get(code)'$font(,,textalpha-128,50-150-50)'$get(end)
//
$get(index) 7 
$font(,,textexpand-1,50-150-50)Testing String
$get(code)'$font(,,textexpand-1,50-150-50)'$get(end)
//
$get(index) 8 
$font(,,fixedwidth-10,50-150-50)Testing String
$get(code)'$font(,,fixedwidth-10,50-150-50)'$get(end)
//
$get(index) 9 
$font(,,bold shadow,50-150-50)Testing String
$get(code)'$font(,,bold shadow,50-150-50)'$get(end)
//
$get(index)10 
$font(,,bold glow-20-100-20,100-200-100)Testing String
$get(code)'$font(,,bold glow-20-100-20,100-200-100)'$get(end)
//
$get(index)11 
$font(,,bold glow-20-100-20 glowalpha-50,100-200-100)Testing String
$get(code)'$font(,,bold glow-20-100-20 glowalpha-50,100-200-100)'$get(end)
//
$get(index)12 
$font(,,bold glow-20-100-20 glowblur-0,100-200-100)Testing String
$get(code)'$font(,,bold glow-20-100-20 glowblur-0,100-200-100)'$get(end)
//
$get(index)13 
$font(,,bold glow-20-100-20 glowblur-10,100-200-100)Testing String
$get(code)'$font(,,bold glow-20-100-20 glowblur-10,100-200-100)'$get(end)
//
$get(index)14 
$font(,,bold glow- glowexpand-0,200-255-200)Testing String
$get(code)'$font(,,bold glow- glowexpand-0,200-255-200)'$get(end)
//
$get(index)15 
$font(,,bold glow-20-100-20 glowexpand-2 glowblur-2,100-200-100)Testing String
$get(code)'$font(,,bold glow-20-100-20 glowexpand-2 glowblur-2,100-200-100)'$get(end)
// composite-1
$font(Calibri,20,,)
$alignabs(12,352,%_width%,%_height%,,)
$font(,,bold textblur-1 textexpand-6,80-196-239) foobar 2000
$alignabs(10,350,%_width%,%_height%,,)
$font(,,bold textblur-1 textexpand-6,80-196-239) foobar 2000
$alignabs(10,350,%_width%,%_height%,,)
$font(,,bold textblur-1 textexpand-5,255-255-255) foobar 2000 
$alignabs(10,350,%_width%,%_height%,,)
$font(,,bold textblur-2 textexpand-1,191-239-254) foobar 2000 
$alignabs(10,350,%_width%,%_height%,,)
$font(,,,80-196-239) foobar 2000
// composite-2
$font(Calibri,20,,)
$alignabs(161,351,%_width%,%_height%,,)
$font(,,bold,40-98-119) foobar 2000
$alignabs(159,349,%_width%,%_height%,,)
$font(,,bold,200-245-255) foobar 2000
$alignabs(160,350,%_width%,%_height%,,)
$font(,,bold,144-221-248) foobar 2000
// composite-3
$font(Calibri,20,,)
$alignabs(312,352,%_width%,%_height%,,)
$font(,,bold textblur-1 textexpand-1,80-196-239) foobar 2000
$alignabs(310,350,%_width%,%_height%,,)
$font(,,bold textblur-1 textexpand-1,80-196-239) foobar 2000
$alignabs(310,350,%_width%,%_height%,,)
$font(,,bold glow-255-255-255 glowexpand-0 glowblur-1,255-255-255) foobar 2000
there are some things to note and consider, like what are default values, how does $font behave with regards to $put/$puts/$get, $alignrel, $padding, $calcwidth/$calcheight etc.

default values for glow are glowexpand-2 and glowblur-2.

when using advanced effects antialiasing is disabled (even for alpha blending), there's limited rendering space etc. also following text affects the previous one, so you may need to add spaces or use $alignabs etc.

you can store and restore font settings using $put/$puts/$get like $puts(font,$font(Calibri,9,bold,100-100-100)). you should restore it after $alignrel, not before. also $calcwidth/$calcheight aren't affected by font settings set by using $get. they work using the last 'real' $font statement, even if it was one inside $puts.

Track Info Panel with ability to change font

Reply #244
-deleted-
fr3ak.wordpress.com

Track Info Panel with ability to change font

Reply #245
VERY nice tips mazy. thanks a bunch. now i am wondering if it is possible to change to a different font when a certain character set is used? like for instance if i have a certain font that i thought looked great with regular english songs but it doesn't properly display korean or chinese i would like to be able to switch to another font in such a circumstance to avoid having the display show squares or other various gibberish.

Track Info Panel with ability to change font

Reply #246
awesome tips mazy will start playing around with them


Track Info Panel with ability to change font

Reply #248
Is "update every second" the smallest possible update value?
I have a trackinfo progress bar and a status bar progress bar, when I fast forward a song, the status bar pb is instantly at the right position, the trackinfo pb takes a little longer for the same.
It's just a tiny little thing, but I'm just curious.
Thanks

Track Info Panel with ability to change font

Reply #249
well it should respond to seek event (rather than update even faster than every second).