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

Track Info Panel with ability to change font

Reply #601

Feature Request

Allow buttons, rectangles and images to flow with text instead of specifying a position. Thanks!

use $calcwidth to find the length of text and size them that way

That really only would apply to horizontal placement on a line of text. What I really want is vertical positioning after several rows of text. I can't specify height because I'm hiding empty lines with $if statements.

Track Info Panel with ability to change font

Reply #602
I dont have much knowledge with that sintax, but I was trying to create a info pannel.
My fb2k uses a sidebar to display the coverart pannel, the specrum analyse pannel and the trackinfomod pannel with tha code:

Code: [Select]
$drawrect(0,0,0,20,brushcolor-190-190-190 width-1)
$drawrect(0,19,0,189,brushcolor-51-103-189  width-1)
$drawrect(10,30,120,170,brushcolor-43-86-159 pencolor-null)
$alignabs(0,1,140,210,center,top)$font(aerial,9,glow-157-0-79 glowblur-5,255-255-255)%_trackinfo_mode%$char(10)$if(%_trackinfo_notrack%,$align(center,middle)$font(Lucida Sans Unicode,15,glow-255-255-255 glowexpand-2 glowblur-5,0-0-160)No track playing,
$align(CENTER,MIDDLE)$font(Microstyle Extended,10,bold glow-255-255-255 glowexpand-2 glowblur-5,0-0-160)%artist%$char(10)$char(10)
$font(Microstyle Extended,10, bold glow-255-255-255 glowexpand-2 glowblur-5,0-0-160)%title%$char(10)$char(10)
$font(Microstyle Extended,10,bold glow-255-255-255 glowexpand-2 glowblur-5,0-0-160)%album%
$alignabs(-22,85,150,210,right,middle)
$font(Visitor TT2 -BRK-,10,glow-255-255-255 glow- glowexpand-0,0-0-0)%samplerate%Hz %__bitrate%kbps %__codec%$char(10)
%channels% [%playback_time% / ]%length%)


I want to optimize it, with the ability to cut off or minimize the font size for too long %titles% and %albums% and add a background. But I dont know how to do it. if anyone could help me, I'll be grateful.

Track Info Panel with ability to change font

Reply #603


Feature Request

Allow buttons, rectangles and images to flow with text instead of specifying a position. Thanks!

use $calcwidth to find the length of text and size them that way

That really only would apply to horizontal placement on a line of text. What I really want is vertical positioning after several rows of text. I can't specify height because I'm hiding empty lines with $if statements.

Actually you can if you make a counter that increments itself every time an if-statement is true. Then multiply the counter by the amount of space you want between each button, then put that formula in the Y co-ordinate of each button function. There you have dynamic "line spacing" or whatever you want to call it. But I noticed, if you have a lot of them it makes foobar a bit sluggish on track changes. So I agree with you, it would good if there were buttons that positioned themselves relatively.

Track Info Panel with ability to change font

Reply #604

Feature Request

Allow buttons, rectangles and images to flow with text instead of specifying a position. Thanks!

Actually you can if you make a counter that increments itself every time an if-statement is true. Then multiply the counter by the amount of space you want between each button, then put that formula in the Y co-ordinate of each button function. There you have dynamic "line spacing" or whatever you want to call it. But I noticed, if you have a lot of them it makes foobar a bit sluggish on track changes. So I agree with you, it would good if there were buttons that positioned themselves relatively.

Yeah. The code I'm using now is already quite long and testing for each line would be fairly difficult to maintain with changes and I'd rather not it up any more processor time than necessary.

Track Info Panel with ability to change font

Reply #605
I have noticed what may be a bug. Leading spaces are not always respected.

Elsewhere on this forum I found a little dancing stick figure. The code for this consists of a select that picks a 3x3 grid of text.

Two choices are shown below.
Code: [Select]
... o>$char(10)<! $char(10) <>$char(10),
<o>$char(10) ! $char(10)< >$char(10),
...


I would show output versus expected output, but I cannot see how to do so using this forum software (as all leading spaces are ignored in both the code and font environments).

When the first character of the output is a space this is displayed correctly (as in the first choice). However, when the second or third line starts with a space the output line starts with the first non space character. Placing each line of output in single quotes does not fix the problem. Placing a non space character first on each line results in correct output. I am using a fixed width font.

Track Info Panel with ability to change font

Reply #606
hello,
can you make the $button() detect when its option is active or not? I dream the day I will be able to see when the "stop after current" is on or off...
maybe keeping the button in hover state?
ty in anyway

Track Info Panel with ability to change font

Reply #607
apoglogies in advance if this has been discussed before, but i didnt really know what to search for in this case.

has anyone else encountered the bug where your buttons are not getting displayed after you opened a file without foobar running already?
i.e. whenever i start up foobar via opening a file my buttons will not be shown in the  panel. however they will still work. only the images cannot be seen.

i hope someone can help me with this

brdgs
- creative x-fi extreme music
- sennheiser 650hd
- F U B A R++

Track Info Panel with ability to change font

Reply #608
hello,
can you make the $button() detect when its option is active or not? I dream the day I will be able to see when the "stop after current" is on or off...
maybe keeping the button in hover state?
ty in anyway


Look for cwb_hooks, it allows you to get some items (like stop after current) into titleformatting variables. You could then put your $button in an $if and have one for when its on and one when its off.

Track Info Panel with ability to change font

Reply #609
Hey guys, I'm crazy with this. Is it possible to stretch or repeat an image from one position to another, to make the panel (or whole fb2k) stretchable itself.
I mean, if I have an image with stuff on it on both sides and I want to fill the space in between with an 1px width image from position A (eg. right end of the left image) to position B (left end of the right image)... how do I do that (if it's possible ")
understand what I mean? fine!
thx for help, callisto
fb2k on OSX: flac q8 > rockboxed Sansa e280v1: Vorbis q5.0

Track Info Panel with ability to change font

Reply #610
Well, You could make a really long image, position it absolutely and have whatever is on the left cover it up.
elevatorladylevitateme

Track Info Panel with ability to change font

Reply #611
Don't you think, that I thought about this possibility? That's not what I want, because of transparency...
fb2k on OSX: flac q8 > rockboxed Sansa e280v1: Vorbis q5.0

 

Track Info Panel with ability to change font

Reply #612
Sorry about trying to help.
Don't worry, I won't make the same mistake twice.
elevatorladylevitateme

Track Info Panel with ability to change font

Reply #613
I am not very familiar with the track info (mod) plugin so i am not sure if the following strange behavior is a bug:

When i use %cwb_activelist% or %cwb_activelist_count% in track info mod with enabled notification optin in cwb_hooks this happens: every click with the mouse inside the track info  on empty area turns the correct display to the display of "?" and the next click back to correct display and so on... 

Track Info Panel with ability to change font

Reply #614
Sorry about trying to help.
Don't worry, I won't make the same mistake twice.

sry, I didn't meant it the way it seemed to be... thx for your try, I'm just  really curious 'bout the thing
fb2k on OSX: flac q8 > rockboxed Sansa e280v1: Vorbis q5.0

Track Info Panel with ability to change font

Reply #615
I am not very familiar with the track info (mod) plugin so i am not sure if the following strange behavior is a bug:

When i use %cwb_activelist% or %cwb_activelist_count% in track info mod with enabled notification optin in cwb_hooks this happens: every click with the mouse inside the track info  on empty area turns the correct display to the display of "?" and the next click back to correct display and so on... 

Probably not a bug. It sounds like you're switching between Now Playing and Follow Cursor modes. I'm guessing that those fields won't display properly in Follow Cursor but I'm not sure what the do since I'm not using that component. You could enclose them with brackets so nothing is displayed.

Track Info Panel with ability to change font

Reply #616
Probably not a bug. It sounds like you're switching between Now Playing and Follow Cursor modes. I'm guessing that those fields won't display properly in Follow Cursor but I'm not sure what the do since I'm not using that component. You could enclose them with brackets so nothing is displayed.


The strange thing is that %cwb_playinglist% or %cwb_playinglist_count% is displayed always correctly.

Track Info Panel with ability to change font

Reply #617
my image buttons aren't drawing on foobar start... does anyone know how I fix that?

EDIT: it fixed itself and I don't know how :S

Track Info Panel with ability to change font

Reply #618


is it possible for a button to switch to a different foobar layout?

and going even further specifying which tabbed panel?


You should be able to just use the panel/layout name as the button command.. I think


yep, thats what i do


couple of things:

i know how to have a button to a different layout, but is there a way to have it load a specific playlist?
as i have a media library layout and it requires the browser playlist

Also can buttons specify which tab they load from a different layout ^ thats what i mean? ie change to a different layout and switch to a specified tab?

Track Info Panel with ability to change font

Reply #619
So far, I've been using a Samurize screensaver to show the playing song info in very big letters.



Now I'm thinking to use a trackinfo panel to do the screensaver job.
Do you think I can build something similar?
Where should I look to find the information to build it?

The key points, for me, are:

1)  to hide everything on the screen and just see the info on a black background

2)  to show a small picture when an $if statement returns "true" or has a certain value from 1 to 10

3)  to scroll vertically inside a section of the screen if a tag content is long (see the performers area)

Thanks.

Track Info Panel with ability to change font

Reply #620
Does anybody know how to make some text scroll vertically if it is too long to fit in an area, please?

I need to show info with very big letters.

I had a look at the thread but couldn't find anything.

Thanks.

Track Info Panel with ability to change font

Reply #621
What do you mean by vertically?Like to break the text into letters and to scroll it from top to bottom?
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #622
So far, I've been using a Samurize screensaver to show the playing song info in very big letters.

[a href="http://img355.imageshack.us/my.php?image=sanscrsv8hh.png" target="_blank"]

Track Info Panel with ability to change font

Reply #623
What do you mean by vertically?Like to break the text into letters and to scroll it from top to bottom?


Not into letters but into lines as wide as the middle box (minus some margins). As you can see in the screenshot, I have the performer field filled (sorry for the twistongue) with many names but I want to use fo it only the middle bordered space. With such a long text, you can't really think to use the horizontal scrolling so I have to go for the vertical one. (That one used for credits at the end of movies). Of course I would need a wrapping too with the ability to show a separator from the end line and the first one to give readers a key to know the starting point. Not sure about bouncing.
So, different problems are involved: calculate how many lines, the height of the text block, where to break the text as to not break a word, etc.
I'm going to study the wiki and examples and try to create the thing but any help or shortcut would be welcome.

Thanks.



So far, I've been using a Samurize screensaver to show the playing song info in very big letters.

[a href="http://img355.imageshack.us/my.php?image=sanscrsv8hh.png" target="_blank"]


Yes, I have already thought to use the dockable panel, in the end. But for now, at development time, I'd rather use a tab (or many) of the foo tab stack. After playing around a few minutes, it seems more stable and predictable, to me.
Of course, I will love the ability to hide everything but the black and the info...

Thanks.

Another thing I'm thinking on is if there will be a way to make the info block, once built, move like a screensaver does...
Let's go back studying and testing...

Track Info Panel with ability to change font

Reply #624
I think I found a bug. It has been mention a few times in the thread, but no one seams to know a way out.
My buttons won't show unless I start foobar "manually" (with shortcut or executable directly). If it starts from a executed media file or with the media key on my keyboard, no buttons show. The strange thing is as soon as I manage to apply changes in the configuration without even modifing the code (I simply press a key, erase it and press apply), buttons appear.

* I'm on Windows XP SP2 french,
* foobar2000 0.9.4.2 (it happens with 0.9.4.1 too) fresh installation (the only configuration that has been done was adding trackinfo_mod panel in the layout)
* Only stock components plus ColumnUI, trackinfo mod, single column - all latest version,
* MS Visual C++ 2005 Runtime Library.

Here is my (pretty basic) code:
Code: [Select]
$button(764,4,0,0,42,21,images\pref.png,images\pref_h.png,Preferences,)