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: best method to draw track info with album art (Read 3054 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

best method to draw track info with album art

after using the default ui with facets for well over a year now i decided i wanted to change up my foobar experience.  it's time to gear up for the windows 7 release tomorrow and go with a theme that will make foobar look more like a native windows 7 app.

i found this theme which is a fantastic starting point:
fooStriped with Lyrics Panel

aside from maybe changing some buttons around and restyling the bottom function bar i'd like to add another panel that just shows a large album cover and more detailed information about the currently playing/selected track.

what is the best way to accomplish this task while giving some flexibility with styling?  i tried just a regular horizontal splitter with the artwork view and item details panels but that just looks far too boring.  i'd really like something similar to what's on this skin on the left side:
FooNight FooDay

there's a nice album art reflection and some rating stars.  a play progress bar would also be nice.  can someone get me started on at least what component is best to use?  i thought maybe the elplaylist would be a good choice, but i played around with it for a little while and realized that it's not very good at displaying only information for a single song.

please help me, thank you.

best method to draw track info with album art

Reply #1
Depends on what you're familiar with. If you are a Java guru probably WSH Mod, else Panel Stack Splitter.

best method to draw track info with album art

Reply #2
okay, i know java well enough but i think i'd probably stick with panel stack splitter.  looking at that FooNight FooDay skin, it appears that they used the panel stack splitter for that left side but i'm having a hard time figuring out their columns ui layout.

also, the readme for panel stack splitter is all in japanese.  is there an english version somewhere?

 

best method to draw track info with album art

Reply #3
after hacking away at the panel stack splitter code for several hours now i'm finally starting to get the hang of it...

one thing that has really helped is the readme translated to english.

i have been having one problem and that is concerning the $drawtext and $drawtextex functions.  it seems to me that every single font string has to be positioned absolutely.  is this true?  i can't seem to find a way to display one string after another on successive lines.  i'm forced to calculate the height of each line item and keep track of what line item i'm on to increase the y positioning correctly.  also, if a string wraps to a new line, the $gettextheight function doesn't get the height of any wrapped lines and the following line will appear on top of the text.

here's the code i've got so far.  if someone can show me an easier way or give me any feedback on this code i'd really appreciate it.

Code: [Select]
$puts(info.padding,12)
$puts(title.font-family,Calibri)
$puts(title.font-size,18)
$puts(title.font-weight,bold)
$puts(artist.font-family,Calibri)
$puts(artist.font-size,14)
$puts(artist.font-weight,normal)
$puts(album.font-family,Calibri)
$puts(album.font-size,14)
$puts(album.font-weight,normal)
$puts(title.height,$gettextheight($font($get(title.font-family), $get(title.font-size), $get(title.font-weight))%title%))
$puts(artist.height,$gettextheight($font($get(artist.font-family), $get(artist.font-size), $get(artist.font-weight))%artist%))
$puts(album.height,$gettextheight($font($get(album.font-family), $get(album.font-size), $get(album.font-weight))%album%))

$font($get(title.font-family), $get(title.font-size), $get(title.font-weight))
$drawtextex(%title%,,,,,0-0-0,wrap noclip hcenter)
$font($get(artist.font-family), $get(artist.font-size), $get(artist.font-weight))
$drawtextex(%artist%,,$add($get(title.height),$get(info.padding)),,,0-0-0,wrap noclip hcenter)
$font($get(album.font-family), $get(album.font-size), $get(album.font-weight))
$drawtextex(%album%,,$add($get(title.height),$get(artist.height),$mul($get(info.padding),2)),,,0-0-0,wrap noclip hcenter)