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: Another track info panel thread (Read 8372 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Another track info panel thread

Thx foosion, I'll test it when I'm at home.

random.n, 2 comments:

1. When having complicated code (what lots may have) and having accidentally more than one "$line_end(ellipsize)" without a $char(10) between, we get cryptic chars. This problem existed before. EDIT: Not only duplicate $line_end cause the chars. I inserted just one and the appear. What I mean is: "EL" Did someone investigate this? EDIT2: Got it. the lineend code has to be at the beginning, no color codes or other lineend codes may be before it.

2. $line_end breaks the square brackets logic. [$line_end(ellipsize,block)%nonexistant%] shows a "?", [%nonexistant%] doesn't show anything.

Another track info panel thread

Reply #1
As the way the thing works right now, $line_end only works properly when it's the first text that gets written after a new line. I can see the restriction of having $line_end at the beginning of the line being a little annoying, so I'll see if something can't be done about it. I think it'll be easy enough to simply take the last $line_end() appearing in a line as the one that gets used.

The way the square brackets work is that so long as what you put in the () part of $line_end() is valid (ie: $line_end(stabface) will fail), the whole square bracket will evaluate as true and display because the $function is treated the same a %field%. Even when I fix the beginning-of-the-line restriction (and thus, the apparant breakage), there still would be no difference in having [$line_end(scroll) %foo%] and $line_end(scroll) [%foo%]. As far as I can tell, this just the way foobar handles things when you combine square brackets, functions, and fields.

I think the proper way to accomplish what you're trying to do would be something like $if(%foo%,$line_end(scroll) %foo%).
They call me random_n...

Another track info panel thread

Reply #2
I think the proper way to accomplish what you're trying to do would be something like $if(%foo%,$line_end(scroll) %foo%).
I've changed most of my code to $if(,,) anyway.

BTW, sometimes the planel remains blank. I started my foobar 3 times, then text appeared. I can't see why this happens. I always get a blank panel if I start a second instance of fb2k with a trackinfo panel...

Another track info panel thread

Reply #3
I just wanted to say a "Thankyou" for updating this component. It is exactly what i needed, a bugfix edition whithout eye-candy.

Quote
added the ability to ellipsize by letter (so it gets cut like "Metallica - Master of Pup...").

This would be an excellent function but doesn't seem to work here. Do i have to change something in the preferences ? (I didn't found anything)

Another track info panel thread

Reply #4
As of present, it's only exposed through the command $line_end(ellipsize,letter), which must be the first thing placed on each line you want it. I'll probably work on this thing a bit more this weekend, as there are a few bugs I've found and some stuff I'd like to add, though don't expect anything like what trackinfo_mod can do - I'm still not practised enough with C++ to accomplish that yet.

...I don't suppose you'd like me to write a trackinfo plugin in Java, eh?
They call me random_n...

Another track info panel thread

Reply #5
Lots may use the trackinfo_mod because of the font stuff... Think about if it makes sense to go on developing this branch... Only thing I'm missing in the mod is the line end modes.

Another track info panel thread

Reply #6
Lots may use the trackinfo_mod because of the font stuff... Think about if it makes sense to go on developing this branch... Only thing I'm missing in the mod is the line end modes.


If the line end modes are really the only thing holding you back, you can create the elipsis mode with code like this (probably needs a bit of tweaking to convert pixel size to point size):

Code: [Select]
$left(
Place your existing code here.
,$div($sub(%_width%,$calcwidth($char(8230))),$calcwidth($char(34))))$char(8230)


The panel already auto-wraps text. The only thing really gone is the animated scroll but I'm sure if you got really inventive you could come up with using $substr(), $calcwidth(), %_width%, and %playback_time_seconds%.  Not to discourage your development, it's good to have options as different people have different needs. But if the end line modes are the only thing missing they can be accomadated for.

Edit: Sat down and refined the code, appears to work for me.

 

Another track info panel thread

Reply #7
I've already thought about that; it's about more for personal education and use than real usefulness. That way when I start something from scratch that I really want, I won't completely bodge it up.
They call me random_n...


Another track info panel thread

Reply #9
The panel does not refresh itself to the current %_isplaying% mode when stopping. After stop playing a track it executes the code for %_isplaying%=true.

Another track info panel thread

Reply #10
As of present, it's only exposed through the command $line_end(ellipsize,letter), which must be the first thing placed on each line you want it.


It would be good to make that behaviour default for all lines. And to fix the most annoying bug occuring when you try to scroll a long text. Currently these are the only things i'm missing in trackinfo

EDIT: One more thing. Is it possible to change the text encoding in the trackinfo panel somehow ?

Another track info panel thread

Reply #11
Sorry for silly question, but where I can download this plugin for 0.9.x?