IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Another track info panel thread, Split from "compile foo_uie_trackinfo"
Squeller
post Jul 25 2006, 13:23
Post #1





Group: Members
Posts: 2351
Joined: 28-August 02
Member No.: 3218



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.

This post has been edited by Squeller: Jul 25 2006, 13:53
Go to the top of the page
+Quote Post
random.n
post Jul 25 2006, 20:22
Post #2





Group: Members
Posts: 13
Joined: 1-July 06
Member No.: 32427



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...
Go to the top of the page
+Quote Post
Squeller
post Jul 26 2006, 04:55
Post #3





Group: Members
Posts: 2351
Joined: 28-August 02
Member No.: 3218



QUOTE (random.n @ Jul 25 2006, 11:22) *
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...
Go to the top of the page
+Quote Post
molnart
post Aug 3 2006, 20:35
Post #4





Group: Members
Posts: 322
Joined: 25-March 06
From: Slovakia
Member No.: 28819



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)


--------------------
www.last.fm/user/molnart
Go to the top of the page
+Quote Post
random.n
post Aug 4 2006, 04:38
Post #5





Group: Members
Posts: 13
Joined: 1-July 06
Member No.: 32427



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. unsure.gif

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


--------------------
They call me random_n...
Go to the top of the page
+Quote Post
Squeller
post Aug 4 2006, 09:32
Post #6





Group: Members
Posts: 2351
Joined: 28-August 02
Member No.: 3218



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.
Go to the top of the page
+Quote Post
Yotsuya
post Aug 4 2006, 20:32
Post #7





Group: Members
Posts: 1535
Joined: 8-May 06
Member No.: 30546



QUOTE (Squeller @ Aug 4 2006, 04:32) *
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
$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.

This post has been edited by Yotsuya: Aug 4 2006, 20:52
Go to the top of the page
+Quote Post
random.n
post Aug 4 2006, 22:02
Post #8





Group: Members
Posts: 13
Joined: 1-July 06
Member No.: 32427



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. smile.gif


--------------------
They call me random_n...
Go to the top of the page
+Quote Post
Squeller
post Aug 7 2006, 08:09
Post #9





Group: Members
Posts: 2351
Joined: 28-August 02
Member No.: 3218



QUOTE (Yotsuya @ Aug 4 2006, 11:32) *
CODE
$left(
Place your existing code here.
,$div($sub(%_width%,$calcwidth($char(8230))),$calcwidth($char(34))))$char(8230)

Thanks. I'll give it a try.
Go to the top of the page
+Quote Post
Squeller
post Aug 7 2006, 14:46
Post #10





Group: Members
Posts: 2351
Joined: 28-August 02
Member No.: 3218



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.
Go to the top of the page
+Quote Post
molnart
post Aug 7 2006, 21:21
Post #11





Group: Members
Posts: 322
Joined: 25-March 06
From: Slovakia
Member No.: 28819



QUOTE (random.n @ Aug 4 2006, 05:38) *
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 ?

This post has been edited by molnart: Aug 7 2006, 22:36


--------------------
www.last.fm/user/molnart
Go to the top of the page
+Quote Post
mente
post Sep 10 2006, 10:50
Post #12





Group: Members
Posts: 3
Joined: 8-June 06
Member No.: 31642



Sorry for silly question, but where I can download this plugin for 0.9.x?
Go to the top of the page
+Quote Post
Squeller
post Sep 10 2006, 12:23
Post #13





Group: Members
Posts: 2351
Joined: 28-August 02
Member No.: 3218



http://www.hydrogenaudio.org/forums/index....st&p=415116
Go to the top of the page
+Quote Post

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: 19th September 2014 - 22:06