IPB

Welcome Guest ( Log In | Register )

Track Info Panel with ability to change font, Split from foo_uie_trackinfo
terrestrial
post Jul 24 2006, 20:48
Post #1





Group: Members
Posts: 274
Joined: 24-July 06
Member No.: 33259



This is a modified foo_uie_trackinfo which uses a differet display function, which allows for different fonts / alignment.

Example screenshot:



and the code from the example:

CODE
$if(%_trackinfo_notrack%,
Stopped,

$align(left,top)
$font(forte,15,shadow,255-255-255)%title%$char(10)
$font(,12,,64-0-0)%album% ['['%date%']']$char(10)
$rgb(0,64,0)%artist%$char(10)
$rgb(64,0,0)%composer%test$char(10)

$align(right,bottom)
$font(Verdana,10,,0-0-0)%__codec%@%__bitrate%$char(10)
[%playback_time% / ]%length%

$align(left,bottom)
$font(Wingdings 2,13,,)
$if(%rating%,
$select(%rating%,
$rgb(155,0,0)κ,
κκ,
κκκ,
κκκκ,
$rgb(0,155,0)κκκκκ),
$rgb(155,155,155)κ)
)


This is very much still a beta, so please beware of bugs.

Download here.

For documentation, please refer to the wiki. (thanks to FofR, Sw!ng, and the other contributors).

Requires:

MS Visual C++ 2005 Runtime Library
GDI+ - only needed for Windows 2000

This post has been edited by terrestrial: Nov 21 2006, 03:03
Go to the top of the page
+Quote Post
 
Start new topic
Replies
mazy
post Jul 31 2006, 15:11
Post #2





Group: Members
Posts: 680
Joined: 11-July 03
From: Brno, Czech Rep.
Member No.: 7705



Yotsuya

1) the way $align works right now is, as you found out, like this:

text flows from top-left corner; when new $align is encountered, the reference point / alignment is changed according to it. with this system, you can't truly make lines with both left and right aligned text. you can, though put some text on the left (even on multiple lines) and then put different text on the right. these two texts do not interact though, so they can overlap etc (which may be handy in some cases and not in others).

i think that the logical extension to $align would be to allow inherit-vertical-position mode, when for example $align(right,) would put text to the right border, but stay on the same vertical position as the last text rendered. another would be to allow pixel adjustments to the point's position like this: $align(center-1,top) or $align(+10,20) etc. +/- sign would mean relative adjustment; you could also specify those keywords like center etc. with this system. it would be possible to do quite a few effects including any-size line spacing, pseudo text shadows etc. i think that the way this track info mod works, it opens possibility to even more things in the future, like placement of images wink.gif

with the current implementation you could do some interesting stuff though, like this:



2) that bold / italics stuff seems to be buggy (i.e. $font(,,bold,)), at least with respect to size field, which is either set to zero or some other value, not really what it was set before (so you got to specify size too: $font(,10,bold,)). also i'm not able to make anything else than bold work (italics, underline, nocleartype ...).

terrestrial, thank you for this quick update, i especially love that track info doesn't redraw in the middle of changing tracks, that's great smile.gif

1) could you please read what i posted in response to Yotsuya? there are still some things broken with the $font when omitting some parameters. plus only 'bold' works for me.

2) that size measuring - i would use it to detect if i can fit some text into the panel (for example when i show some, possibly long, text in one line only). if not, i could skip some parts or show it with smaller font (which is possible with your mod wink.gif )

3) as it is now, when text doesn't fit, it flows (wraps) to the next line. there are cases though, when there won't be space on the next line either - like when the word is wider than the width of the panel. i would like to be able to sometime somehow disable wrapping / clipping and show what fits.

4) somehow related to 3) and also to that $align +/- stuff mentioned in the response to Yotsuya. some fonts especially at bigger sizes have quite some space (vertically) around glyphs and it doesn't look right with regards to panel's borders. i would like to compensate for this by using for example $align(left,-3), but that would have to make sure the text as whole wouldn't get rejected as it's not starting inside the panel's boundaries (or is taller than panel's height).

5) this is much off the current scope of track info panel and you (or others) may disagree to go this way (which is fine by me), but it could be interesting to add settings for left / right / double click actions (so one could set it to different commands, not only to switch between playing / focused mode.

advanced possibility would be to define 'regions' in the formatting, either by $region(x,y,width,height,action) like $region(0,0,10,10,playback\cursor follows playback) or $region(text,action) like $region($ifgreater(%rating%,0,+,-),custom info\rate 1)$region($ifgreater(%rating%,1,+,-),custom info\rate 2) ... the latter example could make rating by simply clicking on corresponding symbol.

note: i somehow like that $font takes size parameter in pixels, as it allows much more accurate size setting for some 'pixel' ttf fonts.

QUOTE (takt @ Jul 31 2006, 10:20) *
Is this version of trackinfo a branch or just a update in features?

Any links to it? Any requirements?

i would say it's more of a branch, as it takes different approach to text positioning and other major issues. link has been posted by terrestrial, the author. it's here. it needs some later 0.9.x version of foobar.

there's also another work-in-progress track info project here, which is more focused on bug fixing (at the moment) the previous official track info panel.


--------------------
info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987
Go to the top of the page
+Quote Post
Andrea
post Jul 31 2006, 15:20
Post #3





Group: Members
Posts: 53
Joined: 6-March 04
From: Rosario, Argentina
Member No.: 12524



QUOTE (mazy @ Jul 31 2006, 11:11) *
i would say it's more of a branch, as it takes different approach to text positioning and other major issues. link has been posted by terrestrial, the author. it's here. it needs some later 0.9.x version of foobar.

there's also another work-in-progress track info project here, which is more focused on bug fixing (at the moment) the previous official track info panel.


Thanks for posting the links! It took me a while find them for foobar 0.9 smile.gif


--------------------
:: http://www.peorth.com.ar ::
Anime Wallpapers

I bought a Rio Karma: I can carry around my OGG files!
Go to the top of the page
+Quote Post

Posts in this topic
- terrestrial   Track Info Panel with ability to change font   Jul 24 2006, 20:48
- - pepoluan   QUOTE (cvax @ Jul 18 2006, 00:08) Is it p...   Jul 25 2006, 00:28
- - Yotsuya   Would it be possible for you to change your font c...   Jul 25 2006, 10:30
- - terrestrial   made a couple of bug fixes, and other changes: ex...   Jul 28 2006, 22:19
|- - Squeller   QUOTE (terrestrial @ Jul 28 2006, 13:19) ...   Jul 30 2006, 12:10
- - Yotsuya   First off I'd like to thank you for continuing...   Jul 28 2006, 22:58
|- - terrestrial   Thanks for your comments QUOTE (Yotsuya @ J...   Jul 28 2006, 23:27
- - pepoluan   2 suggestions: 1. Please provide a readme.txt too...   Jul 29 2006, 02:41
- - mazy   terrestrial - amazing work, thank you so much for ...   Jul 29 2006, 23:33
|- - terrestrial   QUOTE (mazy @ Jul 29 2006, 16:33) [*]i wo...   Jul 30 2006, 22:11
- - mil3s   Bug In the latest foobar beta multiple trackinfo f...   Jul 30 2006, 21:11
- - mil3s   Thanks for fixing the multiple fields bug so quick...   Jul 30 2006, 22:41
- - Yotsuya   Wow thanks for the quick update and thank you for ...   Jul 31 2006, 02:48
- - takt   Is this version of trackinfo a branch or just a up...   Jul 31 2006, 09:20
- - mazy   Yotsuya 1) the way $align works right now is...   Jul 31 2006, 15:11
|- - Andrea   QUOTE (mazy @ Jul 31 2006, 11:11) i would...   Jul 31 2006, 15:20
- - terrestrial   Ok, new version with bug fixes and some additions....   Jul 31 2006, 17:05
- - drbeachboy   I received this failure notice from FB2K_v0.9.3b4:...   Jul 31 2006, 17:53
|- - terrestrial   QUOTE (drbeachboy @ Jul 31 2006, 10:53) I...   Jul 31 2006, 20:15
|- - Schinkentoni   Thank you very much for your development efforts. ...   Jul 31 2006, 21:15
- - mil3s   I know someone said that the font sizes where all ...   Jul 31 2006, 18:01
- - pepoluan   @terrestrial: Now that you have your own thread ....   Jul 31 2006, 18:42
- - mazy   terrestrial, thanks for fixes! that shadow stu...   Jul 31 2006, 18:49
- - Yotsuya   Nice to see this component is continuing to evolve...   Jul 31 2006, 20:14
- - terrestrial   are you guys running the latest version of foobar ...   Jul 31 2006, 21:26
|- - Schinkentoni   the latest stable, yes (0.9.2)   Jul 31 2006, 21:31
|- - drbeachboy   QUOTE (terrestrial @ Jul 31 2006, 16:26) ...   Jul 31 2006, 23:05
- - mazy   i've been playing with the new version and fou...   Jul 31 2006, 22:41
- - mazy   ok, so here goes the 'align' post . format...   Jul 31 2006, 23:28
- - rouge   Can this be made into a seperate component from fo...   Aug 1 2006, 04:06
- - year98   Great works! Some suggestions...somewhat irre...   Aug 1 2006, 04:36
- - thuan   I second the configurable double click behavior.   Aug 1 2006, 06:13
- - terrestrial   QUOTE I've been playing with the new version a...   Aug 1 2006, 07:36
- - year98   Oh! Can you do everything? I'll wait forer...   Aug 1 2006, 07:44
- - Hamallainen   Thanks a lot for your work CODE$alignabs...   Aug 1 2006, 09:42
- - Generalverdacht   just wanted to thank you (creator of new features)...   Aug 1 2006, 11:22
- - mazy   terrestrial, i can confirm that $rgb() works ...   Aug 1 2006, 12:04
- - Yotsuya   Thank you terrestrial for your dedication, this co...   Aug 1 2006, 18:13
- - terrestrial   QUOTE first start with 3. using the new measuremen...   Aug 1 2006, 18:21
- - FrDelefortrie   Another feature request: Can you create $font...   Aug 1 2006, 18:58
- - Yotsuya   I stumbled upon a small inconsistency. $alig...   Aug 1 2006, 19:05
- - Yotsuya   I know a lot of people out there are using trackin...   Aug 1 2006, 19:21
- - terrestrial   QUOTE 1) I would like to be able to use $font...   Aug 1 2006, 19:41
- - FrDelefortrie   QUOTE (terrestrial @ Aug 1 2006, 20:41) Q...   Aug 1 2006, 19:55
- - Hamallainen   Hi, I have a problem with the $align(H,V) fo...   Aug 1 2006, 23:22
|- - mazy   QUOTE (Hamallainen @ Aug 2 2006, 00:22) I...   Aug 1 2006, 23:58
- - Shakedown   This may be a stupid question, but I'm fairly ...   Aug 1 2006, 23:30
- - Yotsuya   Shakedown I believe the function you are looking f...   Aug 1 2006, 23:49
- - Hamallainen   @ mazy thanks for your explanations   Aug 2 2006, 07:37
- - mobyduck   Ok, my turn for a stupid question: how do I add a ...   Aug 2 2006, 08:01
|- - mobyduck   QUOTE (mobyduck @ Aug 1 2006, 23:01) Ok, ...   Aug 2 2006, 12:05
- - Squeller   I also do not see how to insert a blank line. I us...   Aug 2 2006, 09:01
- - mazy   QUOTE (mobyduck @ Aug 2 2006, 09:01) Ok, ...   Aug 2 2006, 10:08
- - stalnation   QUOTE (drbeachboy @ Jul 31 2006, 18:53) I...   Aug 2 2006, 11:00
|- - mazy   QUOTE (stalnation @ Aug 2 2006, 12:00) so...   Aug 2 2006, 11:41
|- - foosion   QUOTE (stalnation @ Aug 2 2006, 12:00) It...   Aug 2 2006, 12:02
- - stalnation   QUOTE (mazy @ Aug 2 2006, 12:41) you coul...   Aug 2 2006, 11:46
- - stalnation   @foosion I compared the msvcr80.dll from the websi...   Aug 2 2006, 12:19
- - thuan   It's just need this. If you've already in...   Aug 2 2006, 14:02
- - FrDelefortrie   Bug report CODE Illegal operation: Code: C0000005...   Aug 3 2006, 17:55
|- - terrestrial   QUOTE (FrDelefortrie @ Aug 3 2006, 11:55)...   Aug 3 2006, 23:29
- - madorangepanda   Is there any chance something like the titleformat...   Aug 3 2006, 18:33
- - ChaosBladE   Not sure if i'll use it right now, But as a pr...   Aug 3 2006, 22:57
- - unabatedshagie   Could people post examples of their trackinfo stri...   Aug 4 2006, 16:00
|- - Yotsuya   QUOTE (unabatedshagie @ Aug 4 2006, 11:00...   Aug 4 2006, 19:44
- - FrDelefortrie   CODE $puts(color3,079AE9) //35B5F9) //...   Aug 4 2006, 17:44
- - Yotsuya   It occured to me that you could use a 1pt font ...   Aug 4 2006, 21:24
- - mazy   nice examples, Yotsuya! i have managed to draw...   Aug 4 2006, 21:29
- - Masahiko   with the code : CODE$align(center,)Ta...   Aug 5 2006, 11:19
- - PonasX   Maybe $align(center,)Tags$char(10) ...   Aug 5 2006, 12:21
- - eisteh   $align(center,top)Tags$char(10) $al...   Aug 5 2006, 12:32
- - rouge   Installing this component still converts all of my...   Aug 5 2006, 13:28
- - metal_termite   Feature request: A checkbox option in the settings...   Aug 5 2006, 13:55
- - Andrew_TA   another feature request, anyway i can get like, c...   Aug 5 2006, 15:06
- - Masahiko   QUOTE (PonasX @ Aug 5 2006, 13:21) Maybe ...   Aug 5 2006, 17:33
|- - Yotsuya   QUOTE (eisteh @ Aug 5 2006, 13:32) ...   Aug 5 2006, 20:19
- - FrDelefortrie   from the read-me QUOTE Before the first $alig...   Aug 5 2006, 17:41
- - Masahiko   QUOTE (Yotsuya @ Aug 5 2006, 21:19) I thi...   Aug 6 2006, 10:50
- - Generalverdacht   im not quite sure what i missed but it only says ...   Aug 7 2006, 17:38
- - LL-Hell   here's what I managed to pull so far with the ...   Aug 7 2006, 18:51
- - Neural_Overload   Is there a way to terminate the alignment in a sim...   Aug 9 2006, 03:39
- - Yotsuya   The broken $char(10) appears to have somethin...   Aug 9 2006, 05:36
- - thuan   I have a crash by this plugin here's the crash...   Aug 13 2006, 05:43
- - metal_termite   I have a problem. One of my track info panels keep...   Aug 14 2006, 19:35
- - Sw!ng   Is this the full code your problem goes around ......   Aug 14 2006, 21:15
- - thuan   It seems putting tht $font function in the br...   Aug 15 2006, 00:24
- - Yotsuya   1) The code has no close bracket ']' as Sw...   Aug 15 2006, 00:40
|- - metal_termite   QUOTE (Yotsuya @ Aug 14 2006, 19:40) 1) T...   Aug 15 2006, 02:47
- - Yotsuya   In general I do not like using brackets. Both the ...   Aug 15 2006, 03:21
- - gob   any plans for adding scrolling/elipsed test in thi...   Aug 15 2006, 04:56
- - rouge   If strings are going over the edge, I suggest usin...   Aug 15 2006, 09:14
- - Sw!ng   w00t ?? realy ?? so I didnt need to work out my ow...   Aug 15 2006, 10:51
- - Sw!ng   BTW, anyone of you guys have an explanation, why t...   Aug 15 2006, 16:35
- - Russell777   The only thing stopping me from using this wonderf...   Aug 15 2006, 18:05
|- - Sw!ng   Yes, using the same name for the coponent is realy...   Aug 15 2006, 23:12
- - mazy   you can set line spacing, Russell777, but only for...   Aug 15 2006, 18:14
- - Russell777   Do you meen by using the $alignabs() function...   Aug 15 2006, 18:20
- - Russell777   2 Sw!ng: Well if you want you'll get it ju...   Aug 15 2006, 23:28
- - terrestrial   sorry guys... things are a bit on hold for a momen...   Aug 16 2006, 00:52
- - Sw!ng   @ russell777 2.1 would be nice ... !!   Aug 16 2006, 01:18
13 Pages V   1 2 3 > » 


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st December 2014 - 16:32