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

Track Info Panel with ability to change font

Reply #775
Thanks for fast responses guys. I found the problem... I forgot about the // Global section thing... 

Track Info Panel with ability to change font

Reply #776
Thanx terrestrial, i'll recode it! 
No Foobar? No music

Track Info Panel with ability to change font

Reply #777
I've noticed a weird behaviour with buttons. I have one large album art image which I use as a big button to pause or play music. In the top left of this album art I place a picture of the artist, when this image is not available I display a no artist image and make the region a button to download the latest image.

If I place this button code below the album art button code it does not work, clicking the artist area pauses the track as the larger button seems to be overlaying the smaller one. However, if I place the button code for the image artist download BEFORE the large button code then it works just fine. Surely, by placing code beneath the album art section it should render later and should thus be on top and not visa versa?

I hope this is clear: basically:

button code 1
button code 2

If these overlap button code 1 executes instead of 2.


Track Info Panel with ability to change font

Reply #779
One question: can it load fonts from foobar's difectory, fonts not installed in Windows?

Track Info Panel with ability to change font

Reply #780
highly doubt it

Track Info Panel with ability to change font

Reply #781
forgive my insolence and all but I am just starting out tinkering with this.  I like.

when trying to align anything though, $alignrel or $alignabs both seem to render TOP and CENTER as the same thing... TOP.  BOTTOM puts stuff to the bottom... but CENTER just goes to TOP.  Anyone else seen this or am I a crazy person?

Track Info Panel with ability to change font

Reply #782
forgive my insolence and all but I am just starting out tinkering with this.  I like.

when trying to align anything though, $alignrel or $alignabs both seem to render TOP and CENTER as the same thing... TOP.  BOTTOM puts stuff to the bottom... but CENTER just goes to TOP.  Anyone else seen this or am I a crazy person?


CENTER is for horizontal. MIDDLE is for vertical. Check it.

Track Info Panel with ability to change font

Reply #783
CENTER is for horizontal. MIDDLE is for vertical. Check it.


Oh my god.  I'm retarded.


Ok... now I'm sure I'm just insolent... but say I position something with $align or $alignrel ... and I would like it to be just a few pixels lower than where it shows up... is there anything at all to accomplish that easy?  I wish i could use CSS here lol... margin-top

Track Info Panel with ability to change font

Reply #784
You could use $alignabs(X,Y,width,height,H,V) and play with the ordinate value to specify the exact position where you want your text to be. Where H can be left,center or right and V, top, middle or bottom.

I don't know if you noticed, but you have answers to those questions you asked in the wiki for this component. Just a thought.

Track Info Panel with ability to change font

Reply #785
You could use $alignabs(X,Y,width,height,H,V) and play with the ordinate value to specify the exact position where you want your text to be. Where H can be left,center or right and V, top, middle or bottom.

I don't know if you noticed, but you have answers to those questions you asked in the wiki for this component. Just a thought.


Yeah, I've read the wiki.  Not getting through to me, apparently... I've tried using alignabs, every combination I do just makes the content disappear...

Track Info Panel with ability to change font

Reply #786
One question: can it load fonts from foobar's difectory, fonts not installed in Windows?
The fonts can reside in any folder, but have to be installed.

Track Info Panel with ability to change font

Reply #787
So it cannot work with uninstalled fonts...
I guess that's more about Windows' API than foobar2000.

Track Info Panel with ability to change font

Reply #788
I've got a slight problem when displaying jpegs resized with $imageabs2.  Some pictures are perfect, and others are slightly blurred, enough to make small writing unreadable or edges undefined.

I think the blurred pictures are jpegs saved using the 'progressive' option.  Would that be a fault in foo_uie_trackinfo, or does it use an external .dll which I might have a problem with?

Also, is there an option to resize small pictures to larger sizes?

Track Info Panel with ability to change font

Reply #789
is there a button command i can use to minimize foobar?

Track Info Panel with ability to change font

Reply #790
"Hide"

Track Info Panel with ability to change font

Reply #791
oh duh, thanks

 

Track Info Panel with ability to change font

Reply #792
I've got a slight problem when displaying jpegs resized with $imageabs2.  Some pictures are perfect, and others are slightly blurred, enough to make small writing unreadable or edges undefined.

I think the blurred pictures are jpegs saved using the 'progressive' option. Would that be a fault in foo_uie_trackinfo, or does it use an external .dll which I might have a problem with?

I noticed the same problem, too.
However, it seems that the cause is not progressive jpeg format but an embedded thumbnail image.

Track Info Panel with ability to change font

Reply #793
About fonts not installed : for the developper there is (was?) an easy way to use not installed fonts : it is an API called AddFontResource() I think. And you can load any font file.
If that can help...

Track Info Panel with ability to change font

Reply #794
When pressing "apply" in the trackinfo configuration editor window, the cursor always jumps the the first line. please fix this, this especially sucks when having lots of work and long code.

Another problem:

Code: [Select]
\\ Global
$puts(a, 5)

\\ PerTrack
Blah...

\\ PerSecond
$get(a)


a is undefined in the persecond section. Why? What does "global" mean then?

Track Info Panel with ability to change font

Reply #795
A massive cpu usage problem

I migrated a columns ui layout with 4 track info panels (2 track info, 2 track info mod) to another layout with only one track info mod panel.

The cpu consumption of fb2k increased from 5 to 70% (on playback), but for whatever reason, only on my notebook. On my other PC, which is slower than the notebook, it's still at 5%. In how far can my layout be machine dependent???

It's a lot of code and work in progress, but maybe someone has an idea...

Code: [Select]
deleted, as the code was not the cause of problems...


EDIT: Is this behaviour a bug? I found out, if I delete the complete "PerSeconds" section, cpu usage is still high. If I delete the "// PerSecond" statement then, CPU usage decreases from 70 down to 5%.

EDIT2: It's terrible. No additional code, just the single line "// PerSecond" causes my fb2k to use 70% cpu.

EDIT3: I installed a second fb2k instance on the same. No cpu wasting there. Hmm.

Track Info Panel with ability to change font

Reply #796
Can someone tell me why images won't work? I have the proper PNG libraries, but I can't get ANY images to display. I have an image in C:\program files\foobar2000\icons named "asdf.png".

Quote
$imageabs(20,20,icons\asdf.png,)


That should display an image, correct? Because I'm not getting anything at all. Even if I restart foobar, there still nothing being displayed.

Track Info Panel with ability to change font

Reply #797
Can someone tell me why images won't work? I have the proper PNG libraries, but I can't get ANY images to display. I have an image in C:\program files\foobar2000\icons named "asdf.png".

Quote
$imageabs(20,20,icons\asdf.png,)


That should display an image, correct? Because I'm not getting anything at all. Even if I restart foobar, there still nothing being displayed.


The directory name of the $imageabs function is with respect to the Profile directory, located at C:\Documents and Settings\USERNAME\Application Data\foobar2000\, as expained on the wiki, http://wiki.hydrogenaudio.org/index.php?ti..._trackinfo_mod), which is linked on the first page of this topic.  Although it's a little more complicated, you could use the $imageabs2 function.

Track Info Panel with ability to change font

Reply #798
If you have one profile for all user accounts, then you code should work. Otherwise, eboomer has explained it very well

Drop the images in the profile folder if you don't want to touch the more complicated $imgabs2().

Track Info Panel with ability to change font

Reply #799
I'd be surprised if this hasn't been suggested before, but I'd like to see some script control commands, along the lines of Sinclair BASIC to keep it nice and simple, but handy to speed up code execution and make it easier to code.  We already have IF..THEN..ELSE, so I'd like to see:

GOTO - Used to jump to another piece of code. $goto(ARTIST INFO) could be used to jump forwards to a comment line containing '// ARTIST INFO'.

GO SUB..RETURN - Used to execute a sub routine, returning after finished.  $gosub(ARTIST INFO) would jump to the same comment line as above, but at the end of that piece of code would be $return() to jump back to the $gosub command and continue from there.

END - Used to terminate code execution and tell foobar to go do something else (can't remember if this was in Sinclair BASIC).  $end() could be used for this.  Useful to store your subroutines after this so they don't get executed when they shouldn't.

FOR..NEXT - Creates a loop where a variable is incremented on each loop between two set values.  $for(count,1,10) could create a loop that would be executed 10 times, each time the value of 'count' increasing by one.  $get(count) would be used as normal to get the value.  $next(count) would be at the end of the code, telling foobar to repeat the loop.  A fourth parameter could be used to set the increment, so $for(count,2,10,2) would increment by 2, giving 5 loops where count would equal 2, 4, 6, 8 and 10.

Just an idea.  I'm sure it would make code execution a little faster, skipping large amounts of code or making massive $if commands a thing of the past.  The for next loop would be great for stepping through $meta variables one by one, without having to repeat the code for every instance.