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 724709 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Track Info Panel with ability to change font

Reply #250
here is the new version of my panel, still workin on it:


Track Info Panel with ability to change font

Reply #251
Is there anyway to get trackinfo to retrieve data from a txt file?
I'd like to add something like a mini biography to some of my artists. I guess I could use the comment tag for this as well, but I'd prefer to have external file because I'd find it much easer to just edit an %artist%.txt instead.

If this isn't possible yet, I'd really like to see that in a coming release.

Track Info Panel with ability to change font

Reply #252
You could try abusing a lyrics panel into doing something like that.

I haven't had any experience with the available lyrics panels though so you're on yer own ;P

here is the new version of my panel, still workin on it:

[a href="http://www.ihateyou2.com/foobar1.jpg" target="_blank"]

Also you should try not to repeat information, it means you waste space. The artist/album are on the screen like 3/4 times...is that necessary?
hi

Track Info Panel with ability to change font

Reply #253
You could try abusing a lyrics panel into doing something like that.

I haven't had any experience with the available lyrics panels though so you're on yer own ;P


here is the new version of my panel, still workin on it:

[a href="http://www.ihateyou2.com/foobar1.jpg" target="_blank"]

Also you should try not to repeat information, it means you waste space. The artist/album are on the screen like 3/4 times...is that necessary?


oh no no no lol im just keeping those there for the mean time until i get all the necessary information into the one panel

Track Info Panel with ability to change font

Reply #254
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)?


1) Eventually. Until then a non wrapping mode can be emulated using $alignabs

2) They're not "official" functions yet (maybe unfinished, etc). I think they were found by looking for stings in the binary


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


I've added a SHADOWCOL option for the next version.

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


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


Unfortunately I don't think there's a seek notification... (could have missed it though).

Track Info Panel with ability to change font

Reply #255
Hi, I'm using this code:

Code: [Select]
$align(left,top)%title%$char(10)
[%album%][ CD %discnumber%]$char(10)
[Track %tracknumber%$char(10)]
[%date%][ %genre%]

$align(right,top)%artist%$char(10)
$if(%rating%,Rated %rating%,Unrated)$char(10)
$if(%play_counter%,Played %play_counter% times,Never played)$char(10)
foobar2000
$padding(0,100)
$align(left,top)%_time_elapsed%$align(right,top)%length%
$padding(0,23)
$drawrect(,,,10,brushcolor-null pencolor-255-255-255)

$puts(progress,$muldiv(%playback_time_seconds%,$sub(%_width%,24),%length_seconds%))

$ifgreater($get(progress),0,
$padding(2,2)$drawrect(,,$get(progress),6,brushcolor-255-255-255 pencolor-null),)$align(top,left)

...but the time info doesn't display. If I move it upwards a bit, it works fine. I can't see any reason for it, it just... disappears.  Any ideas?
err... i'm not using windows any more ;)

Track Info Panel with ability to change font

Reply #256
I pasted your code into a fresh panel and it appears to be working fine for me as long as I'm not listening to online radio.. what exactly is supposed to be broken?

Track Info Panel with ability to change font

Reply #257
Above the progress bar, there is no time. it should be:

Code: [Select]
0:45                     1:43
[----                              ]
(bad example, but yeah). It's just the progress bar.

Edit:
Screeny.
err... i'm not using windows any more ;)

Track Info Panel with ability to change font

Reply #258
Hi

Is there a way to add the Status info "Repeat Track", "Repeat Playlist", "Shuffle Playlist", "Default". Because i will add this to my track info so that i know that i enabled it.

Bye and Thx for any help.

Track Info Panel with ability to change font

Reply #259
Elliott:

Your code appears to be working fine on my end.  Have you tried making another panel and pasting the code? Have you tried using a different font?  Is there more code being used in the panel than what you posted?
Try simplifying the code piece by piece until you can figure out the problem.  Start by just using the code that is giving you hassle:

Code: [Select]
$align(left,top)%_time_elapsed%$align(right,top)%length%
$padding(0,23)
$drawrect(,,,10,brushcolor-null pencolor-255-255-255)

$puts(progress,$muldiv(%playback_time_seconds%,$sub(%_width%,24),%length_seconds%))

$ifgreater($get(progress),0,
$padding(2,2)$drawrect(,,$get(progress),6,brushcolor-255-255-255 pencolor-null),)$align(top,left)

DIN1031:
This has been asked before and the conclusion was that there is no existing way to pull this information with standard scripting.

Track Info Panel with ability to change font

Reply #260
Tried a different font, no more code, and it happens with just the text and progress bar. It's like a cut off point. :/
err... i'm not using windows any more ;)

Track Info Panel with ability to change font

Reply #261
I did notice that you are using a lot of $align(,top) functions.. specifically the top alignment has some anti-text collision routines and I notice from your screen shot that there possibly may not be enough room between the text and progress bar to fit your text.  Try using a smaller font or moving the progress bar further down.

Track Info Panel with ability to change font

Reply #262
I suggest some clear-up on the syntax before jumping into new features. When comparing to Foobar's other scripting languages this one looks more complex and less understandable, Even for developers such as myself.

Track Info Panel with ability to change font

Reply #263
I did notice that you are using a lot of $align(,top) functions.. specifically the top alignment has some anti-text collision routines and I notice from your screen shot that there possibly may not be enough room between the text and progress bar to fit your text.  Try using a smaller font or moving the progress bar further down.

I tried moving the progress bar many, many pixels down - still nothing. It's really unexplicable. :/

Edit: as a Hacky Fix?, I used two $char(10)s and a lineheight to position it above. it looks lovely now

edit: scratch that... %isplaying% is returning ?. I didn't do anything... whoops?
err... i'm not using windows any more ;)

Track Info Panel with ability to change font

Reply #264
Hi

Is there a way to add the Status info "Repeat Track", "Repeat Playlist", "Shuffle Playlist", "Default". Because i will add this to my track info so that i know that i enabled it.

Bye and Thx for any help.

DIN1031:
This has been asked before and the conclusion was that there is no existing way to pull this information with standard scripting.


I'm quite sure cwbowron's foo_cwb_hooks does this. Download it and try the variable %cwb_playback_order%.

Track Info Panel with ability to change font

Reply #265

Hi

Is there a way to add the Status info "Repeat Track", "Repeat Playlist", "Shuffle Playlist", "Default". Because i will add this to my track info so that i know that i enabled it.

Bye and Thx for any help.

DIN1031:
This has been asked before and the conclusion was that there is no existing way to pull this information with standard scripting.


I'm quite sure cwbowron's foo_cwb_hooks does this. Download it and try the variable %cwb_playback_order%.




unfortunatly doesnt work here.... 

Track Info Panel with ability to change font

Reply #266
Strange that it doesn't work.  Russell's Home Stereo config for this panel has a section for the Playback Order, which is using foo_cwb_hooks.

Track Info Panel with ability to change font

Reply #267
Those CWB hooks keep adding more and more useful functions I need to start checking for updates more often.. that hook was added just this past week :)

DIN1031: Make sure you update your hooks to the latest version, I just tested kockroach's suggestion and it is working fine here.

Track Info Panel with ability to change font

Reply #268
Problem with the Syntax of "#LINEHEIGHT,n#" -> I can't have it in $if statements because the "," is being parsed.
Another question: if using $font(font,size,,) wouldn't it be more useful not to touch the currently used color? At any font change, it breaks my previously set colors (and colours are a rather complicated task here, they change depending on time)

Track Info Panel with ability to change font

Reply #269
I agree...skipping a parameter from the $font(,,,) command should use the current/last value, not switch to the default.  This way you could, for example, use it once to set font, size, style, and color, then use it later on to just change the size.

Track Info Panel with ability to change font

Reply #270
Problem with the Syntax of "#LINEHEIGHT,n#" -> I can't have it in $if statements because the "," is being parsed. ...

Code: [Select]
$if(xy,'#LINHEIGHT,5#','#LINHEIGHT,10#')
will work like you expect it...!!

Track Info Panel with ability to change font

Reply #271
Another question: if using $font(font,size,,) wouldn't it be more useful not to touch the currently used color? At any font change, it breaks my previously set colors (and colours are a rather complicated task here, they change depending on time)


I've been playing with fonts and colors in both trackinfomod and singlecolumnplaylist.. and I'm fairly certain just specifying a new font does not alter the current color.  As a test I opened a new trackinfomod, set the background to Grey $rgb(128,128,128) and the default text to Black $rgb(0,0,0).  I then entered the following code:
Code: [Select]
$font(tahoma,7,,233-233-233)Tahoma is white$char(10)
$font(verdana,10,,)Verdana still white?


Both lines of text appeared as white as I had originally expected. If your claim were to hold true then the second line of text would have reverted to the default black or something else entirely. This would lead me to conclude that there is probably something else wrong with your code and would suggest that you debug it. If you need help then let us know.  IMO it often helps to break problem code down to basic examples such as this to detect problems when code is not behaving as expected.

Track Info Panel with ability to change font

Reply #272
I've been playing with fonts and colors in both trackinfomod and singlecolumnplaylist.. and I'm fairly certain just specifying a new font does not alter the current color.  As a test I opened a new trackinfomod, set the background to Grey $rgb(128,128,128) and the default text to Black $rgb(0,0,0).  I then entered the following code:
Code: [Select]
$font(tahoma,7,,233-233-233)Tahoma is white$char(10)
$font(verdana,10,,)Verdana still white?
Cannot test it now - maybe it only breaks the old style color definitions (the ones which are outside of the $font statement -> ffffff)? Thanks for your hint, so possibly doing all color definitions inside of $font() would help then...

Another weakness I saw is, the colour argument in $font has a new syntax (r-g-b) diffrent from the old style ($rgb() or ffffff) -> no easy recycling of existing variables possible e.g....

Track Info Panel with ability to change font

Reply #273
I repeated the previous experiment with the following code:
Code: [Select]
$font(tahoma,7,,)$rgb(233,233,233)Tahoma is white$char(10)
$font(verdana,10,,)Verdana still white?

The second line of text did indeed fall back to the default black so yes there appears to be a problem retaining colors that were specified outside of the $font() statement.  This component has historically had issues with $rgb() and BBGGRR color codes (it originally did not support them at all and singlecolumnplaylist still doesnt support them) so I have generally migrated to either the $font(,,,RR-GG-BB) format or simply re-specify the color with $rgb() after every $font() command. I no longer use the BBGGRR format codes as they often do not paste into the forum properly and I'm usually too lazy for binhex conversions.

But you are right, there does seem to be some buggy behavior when $font() and $rgb() interact.

Track Info Panel with ability to change font

Reply #274
iirc, there's $textcolor function. not that these issues with colors, fonts, styles etc. should have not been fixed / taken care off in the first place ...