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: foo_uie_graphical_browser (Read 245171 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_uie_graphical_browser

Reply #100
Kiteroa

thx,
Code: [Select]
$replace(%path%,%filename_ext%,)../cover.jpg


works fine

foo_uie_graphical_browser

Reply #101
hmmm.... im using $rand(10) to display no cover art pics..
i noticed that when i mouse over the pic it changes.. not a problem
my problem is im on a pos computer and its using alot of memory.

so i was thinking is there a way to load images according to First Letter of album or something similar?

exp: $if(%artist%, First Letter T, NoCover2.jpeg,First Letter M, NoCover5.jpeg)


Edit: I Figgered a work around... I have the $rand() Looking inside the code instead of looking tho my computer.

Code: [Select]
$puts(nocover0,C:\Program Files\Foobar\images\NoCover2\nocover0.jpeg)
$puts(nocover1,C:\Program Files\Foobar\images\NoCover2\nocover1.jpeg)
$puts(nocover2,C:\Program Files\Foobar\images\NoCover2\nocover2.jpeg)
$puts(nocover3,C:\Program Files\Foobar\images\NoCover2\nocover3.jpeg)
$puts(nocover4,C:\Program Files\Foobar\images\NoCover2\nocover4.jpeg)
$puts(nocover5,C:\Program Files\Foobar\images\NoCover2\nocover5.jpeg)
$puts(nocover6,C:\Program Files\Foobar\images\NoCover2\nocover6.jpeg)
$puts(nocover7,C:\Program Files\Foobar\images\NoCover2\nocover7.jpeg)
$puts(nocover8,C:\Program Files\Foobar\images\NoCover2\nocover8.jpeg)
$puts(nocover9,C:\Program Files\Foobar\images\NoCover2\nocover9.jpeg)
$puts(nocover10,C:\Program Files\Foobar\images\NoCover2\nocover10.jpeg)
$puts(nocover11,C:\Program Files\Foobar\images\NoCover2\nocover11.jpeg)
$puts(nocover12,C:\Program Files\Foobar\images\NoCover2\nocover12.jpeg)

$draw_image(0,0,$eval(%gb_width%),$eval(%gb_width%),
$if($cwb_fileexists($replace(%path%,%filename_ext%,)folder.jpeg),
$replace(%path%,%filename_ext%,)folder.jpeg,
$if($cwb_fileexists($replace(%path%,%filename_ext%,)folder.jpg),
$replace(%path%,%filename_ext%,)folder.jpg,

$get(nocover$rand(12))

)),
255,nokeepaspect)

If any1 has a better way plz let me know but with my basic skillz thats what i got

foo_uie_graphical_browser

Reply #102
Whenever I need "sufficiently random" numbers, I use a combination of the mod/length functions, as in
Code: [Select]
$mod($len(%album artist%%album%),###)


I know others have used the $crc32 function to similar effect.

foo_uie_graphical_browser

Reply #103
ok Ty  i havnt played with the $mod or $len yet and never heard of $crc32, ill tinker around and see what i can get

foo_uie_graphical_browser

Reply #104
@BuM: in your code, you should use $select instead of using a bunch of custom variables. It's faster and has less overhead. The mod len combi is a little faster but the variation is worse than crc32. I don't know how $rand is implemented in foobar but anyway crc32 calculation time is proportion to length of strings so more often than not I think $rand is faster especially in case the pool is small like yours.

foo_uie_graphical_browser

Reply #105
New version is out.

From the change log, there's %gb_isplaying% command (among others) which may make some of you really happy. 

foo_uie_graphical_browser

Reply #106
Yeah, me included, but this new version has so much more to be happy with. It's just getting better and better.

@Keikonium: I've sent you the new readme.

foo_uie_graphical_browser

Reply #107
Thanks for a great update - I love the per-track pop-up and am using it already!

foo_uie_graphical_browser

Reply #108
Updated config:


Require graphical browser rev010
Images required:
Play icon
Glare image
Put those images into foobar components folder, or any other places you like. In this case, you need to change the path for these images.

Prominent changes: all are in popup rendering:
* Half transparent popup background frame.
* Display currently playing song in popup of the currently playing item.
* Total length of item and total played times.
* [!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--]Arithmetic mean album rating.[/size][!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--] Later, I might be able to do weighted mean album rating [/size][!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--](using play_count statistic)[/size][!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--] with future version of this component.

[/size]
Settings:


As before, you have some freedom with item size and popup size. For item size, horizontal size is about double of vertical size. And for popup size, vertical size is bigger (about 40 pixels is best) than horizontal size. Remember that, if you set those sizes too small, everything will be out of order. But with suitable size, my code will automatically set itself in fine.

Item code:
Code: [Select]
//cover sources, if you add more sources please add more $draw_image functions below
$puts(cpath1,$replace(%path%,%filename_ext%,*))
$puts(cpath2,$replace(%path%,%directory%\%filename_ext%,*))

//no cover source, remember to change this if needed
$puts(nocover,components\default.png)

//other image sources
$puts(glareImage,components\glareyo0.png)
$puts(playIcon,components\Play-icon256-by-nagaya.png)

//font settings
$puts(fontName,Segoe UI)
$puts(fontSize,9)
$puts(fontStyle1,)
$puts(fontStyle2,i)

//dimensions and positions of objects
$puts(itemW,$eval(%gb_width%-1))
$puts(itemH,$eval(%gb_height%-1))
$puts(frameD,$eval(%gb_height%-8))
$puts(frameCu,$eval(%gb_height%/30))
$puts(coverD,$eval($get(frameD)-4))
$puts(textX,$eval($get(frameD)+7))
$puts(textW,$eval(%gb_width%-$get(textX)-4))
$puts(textH,$eval(%gb_height%-20))
$puts(subitem_countY,$eval($get(textH)+6))
///////////////////////////////////

$if(%gb_focused%,
$set_pen(44-98-139)
$draw_rect(0,0,$get(itemW),$get(itemH))
$gp_set_brush(255-109-182-221,0,%gb_height%,0-255-255-255,0,0)
$gp_fill_rectangle(1,1,$eval(%gb_width%-2),$eval(%gb_height%-2)),
$set_brush(240-240-240,cross)
$fill_rect(0,0,%gb_width%,%gb_height%)

$select($add($mod(%gb_item_index%,2),1),
$gp_set_brush(100-200-200-200),
$gp_set_brush(100-240-240-240)
)
$gp_fill_rectangle(0,0,%gb_width%,%gb_height%)
)

$set_pen(0-0-0)
$set_brush(0-0-0)
$round_rect(5,4,$get(frameD),$get(frameD),$get(frameCu),$get(frameCu))

//add more cover sources here
$if3(
$draw_image(7,6,$get(coverD),$get(coverD),$get(cpath1),255,nokeepaspect),
$draw_image(7,6,$get(coverD),$get(coverD),$get(cpath2),255,nokeepaspect),
$draw_image(7,6,$get(coverD),$get(coverD),$get(nocover),255,nokeepaspect)
)

$draw_image(7,6,$get(coverD),$get(coverD),$get(glareImage),50,nokeepaspect)

$if(%gb_isplaying%,
$draw_image(7,6,$get(coverD),$get(coverD),$get(playIcon),128)
)

$set_font($get(fontName),$get(fontSize),$get(fontStyle1))
$draw_text(%gb_group%,$get(textX),6,$get(textW),$get(textH),right,wordbreak,end_ellipsis)
$set_font($get(fontName),$get(fontSize),$get(fontStyle2))
$draw_text($add(%gb_item_index%,1)/%gb_item_count% %gb_track_count%
$ifgreater(%gb_track_count%,1, tracks, track),
$get(textX),$get(subitem_countY),$get(textW),12,right,singleline,bottom)

$if(%gb_mouse_over%,
$gp_set_brush(128-255-255-255,0,0,0-255-255-255,%gb_width%,%gb_height%)
$gp_fill_rectangle(0,0,%gb_width%,%gb_height%)
)

Popup code:
Code: [Select]
//cover sources, if you add more sources please add more $draw_image functions below
$puts(cpath1,$replace(%path%,%filename_ext%,*))
$puts(cpath2,$replace(%path%,%directory%\%filename_ext%,*))

//no cover source, remember to change this if needed
$puts(nocover,components\default.png)

//Font settings for artist display
$puts(aFontName,Segoe Print)
$puts(aFontSize,9)
$puts(aFontStyle,)

//Font settings for item info
$puts(iFontName,Arial)
$puts(iFontSize,9)
$puts(iFontStyle,)

//Dimensions
$puts(coverD,$eval(%gb_width%-8))
$puts(textY,$eval($get(coverD)+6))
$puts(textH,$eval(%gb_height%-$get(textY)-2))
$puts(textW,$eval(%gb_width%-4))
$puts(infoY,$eval(%gb_width%-24))

//Album rating calculation
$puts(temp,$muldiv($sum('%rating%'),100,%gb_track_count%))
$puts(aRating,
$ifgreater($get(temp),449,5,
$ifgreater($get(temp),349,4,
$ifgreater($get(temp),249,3,
$ifgreater($get(temp),149,2,
$ifgreater($get(temp),49,1,
0
)
)
)
)
)
)
//////////////////////////////////////

$gp_set_brush(128-128-128-128)
$gp_fill_rectangle(0,0,%gb_width%,%gb_height%)
$gp_set_pen(255-0-0-0,1)
$gp_draw_rectangle(0,0,$eval(%gb_width%-1),$eval(%gb_height%-1))

//add more cover sources here
$if3(
$draw_image(4,4,$get(coverD),$get(coverD),$get(cpath1),255),
$draw_image(4,4,$get(coverD),$get(coverD),$get(cpath2),255),
$draw_image(4,4,$get(coverD),$get(coverD),$get(nocover),255)
)

$gp_set_font($get(aFontName),$get(aFontSize),$get(aFontStyle))
$gp_set_pen(255-255-255-255,3,,bevel)
$gp_set_brush(255-0-0-0)
$gp_set_string_format(center,center,ellipsis_word)
$gp_set_smoothing_mode(1)
$gp_draw_string_path($if(%album artist%,by %album artist%,Unknown Artist),12,,0,$get(textY),$get(textW),$get(textH)),

$gp_set_font($get(iFontName),$get(iFontSize),$get(iFontStyle))
$gp_set_string_format(far,center)
$gp_draw_string_path(%gb_length% #$sum('%play_count%'),12,,4,$get(infoY),$get(coverD),20)

$gp_set_string_format(near,center)
$gp_draw_string_path(
$repeat(★,$get(aRating))
$repeat(☆,$sub(5,$get(aRating)))
,12,,4,$get(infoY),$get(coverD),20)

If you're using WinXP, you need to have East Asian languages support. Those rating star characters need it.


Per track (Popup) code:
Code: [Select]
//Font settings for playing track
$gp_set_font(Tahoma,9,b)
$gp_set_pen(128-255-255-255,3,,bevel)
$gp_set_brush(255-0-0-0)
$gp_set_smoothing_mode(1)
$gp_set_string_format(center,near)
//////////////////////////////////////

$if(%gb_isplaying%,
$set_org(6,6)
$gp_draw_string_path([%tracknumber%. ]%title%,12,,0,0,$eval(%gb_width%-12),$eval(%gb_width%-32))
)

Lastly, I want to thank the developer of this component again. All of this wouldn't have been possible, if he hadn't started it.

EDIT: Add one to %gb_item_index%.
EDIT2: Fix some mistakes and add rounded rating.

foo_uie_graphical_browser

Reply #109
Looking Good thuan, Thank you and every1 else for posting ur configs.
for ppl that learn from seeing(like me) it really helps

foo_uie_graphical_browser

Reply #110
Hi,


with the last version, 0.10, it's not possible to desactivate the  graphical browser scroll bar.

It was desactivable with the 0.9 version :

right click > settings > bottom right :

- show scroll bar
- scroll by a multiple of scroll size
- scroll size

no more choice ?

foo_uie_graphical_browser

Reply #111
Those settings are in the Others Tab beside Draw Tab. Look at the 2nd picture in my previous post.

foo_uie_graphical_browser

Reply #112
Those settings are in the Others Tab beside Draw Tab. Look at the 2nd picture in my previous post.



oh yeah !!!!

I'm stupid !!!  or, may be, becoming too old.......

Thanks, thuan.

foo_uie_graphical_browser

Reply #113
Thanks for this great component!

But what is the function of the "transparent mode" checkmark in the options dialog?

foo_uie_graphical_browser

Reply #114
Does anyone know how to get the track list of an album to display in the popup? I can get the currently playing track, but I want them all... Kinda like in this image: http://foobar2000.xrea.jp/up/files/up808.jpg

Also, rev011 is out if anyone hasn't updated yet . http://www.tv2ch.info/fb2k/
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

 

foo_uie_graphical_browser

Reply #115
Does anyone know how to get the track list of an album to display in the popup? I can get the currently playing track, but I want them all... Kinda like in this image: http://foobar2000.xrea.jp/up/files/up808.jpg

This works for me:
Code: [Select]
$set_org(0,$mul(12,%gb_track_index%))
$if(%gb_isplaying%,$gp_set_brush(255-0-255-0),$gp_set_brush(255-0-0-0))
$gp_set_font(Tahoma,9)
$gp_set_string_format(near,near,ellipsis_word)
$gp_draw_string(%gb_playlist_number% $add(%gb_track_index%,1). %title%,0,0,%gb_width%,15)


Make sure you have "maximum tracks processed by "Per Track" set suitably high on the Others tab.


To the developer - thanks again!

I'm still getting a problem with albums with the same name where all the tracks appear under the first listing for the album - even though the tracks are in different parts of the playlist. Could you fix it so that the tracks for an album group only show only under that album?

Also, I'd love to be able to fix the display to a particular named playlist - not just the active playlist which I keep changing all the time!

foo_uie_graphical_browser

Reply #116
Ah! My problem was that I had the tracks processed by // PerTrack was set to 0 lol. Thanks Kiteroa .

Also, I don't know if anyone else noticed this, but when you type a $ and wait a couple seconds, a box will pop up with the possible variables you can use... REALLY awesome.
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

foo_uie_graphical_browser

Reply #117
But what is the function of the "transparent mode" checkmark in the options dialog?

Read the readme I translated in the first post. Basically, with it, you can set different transparent levels for each object you draw using GDI+. My config uses that, too.


Does anyone know how to get the track list of an album to display in the popup? I can get the currently playing track, but I want them all... Kinda like in this image: http://foobar2000.xrea.jp/up/files/up808.jpg

This works for me:
Code: [Select]
$set_org(0,$mul(12,%gb_track_index%))
$if(%gb_isplaying%,$gp_set_brush(255-0-255-0),$gp_set_brush(255-0-0-0))
$gp_set_font(Tahoma,9)
$gp_set_string_format(near,near,ellipsis_word)
$gp_draw_string(%gb_playlist_number% $add(%gb_track_index%,1). %title%,0,0,%gb_width%,15)


Make sure you have "maximum tracks processed by "Per Track" set suitably high on the Others tab.

And here is a code snippet to draw dynamically height popup:
Code: [Select]
$puts(recH,$add($mul(%gb_track_count%,18),46)) //46 is the static part and 18 is verticle size of each line.
//then draw a rec or whatever using the appropriate function
$draw_rect(0,0,$eval(%gb_width%-1),$get(recH))

I have tried to mimic that up808 popup config, it's pretty easy to write. The problem is with it, you have to set a very high value for vertical popup size (to accommodate long item). This pose a problem, with my vertical scroll config (unlike his is a horizontal one and drawn at upper of the screen), that is sometimes with lower item that has little tracks in it, the popup appears at the upper of the screen and not beside the mouse which looks really weird  . I have also think of a dynamic horizontal size popup with multiple tracklist columns on it. It's feasible, will do that later when I have the time.
I'm still getting a problem with albums with  the same name where all the tracks appear under the first listing for  the album - even though the tracks are in different parts of the  playlist. Could you fix it so that the tracks for an album group only  show only under that album?

This is actually hard to fix consider how this component works (grouping item by group titleformat which return group strings). You should do something with your group titleformat yourself or the tag of particular items to return different group strings. It can be fixed with some workaround on his side but oh well, I think this is more of a problem of your group string titleformat. Why not group items which return the same group string together?
Also, I'd love to be able to fix the display to a particular named playlist - not just the active playlist which I keep changing all the time!

I have mailed the developer about this, he said that this will likely be implimented when he has the time, please be patient.

foo_uie_graphical_browser

Reply #118
This works for me:
Code: [Select]
$set_org(0,$mul(12,%gb_track_index%))
$if(%gb_isplaying%,$gp_set_brush(255-0-255-0),$gp_set_brush(255-0-0-0))
$gp_set_font(Tahoma,9)
$gp_set_string_format(near,near,ellipsis_word)
$gp_draw_string(%gb_playlist_number% $add(%gb_track_index%,1). %title%,0,0,%gb_width%,15)


I cannot seem to change the font color of the tracklist. Can I get a little help? Either it can't be done, or I am just overlooking something..whatever I do the font color stays constant.

TIA

foo_uie_graphical_browser

Reply #119
Change the $gp_set_brush parameter to change the color of text drawn by $gp_draw_string function. In this code the first one is color for playing song and the 2nd is for other songs.

foo_uie_graphical_browser

Reply #120
Wow, revision 11 introduces keyboard letter navigation.
Not quite what I expected (different from Album list and Filter), but still great. Thanks to the developer.

foo_uie_graphical_browser

Reply #121
Rev 12 now out.
I love π

foo_uie_graphical_browser

Reply #122
Changelog:
   2008/03/11   rev012
      Fixed - Resource fatal leak.
      Added - Image cache options.
The new image cache option (default) does not purges the cache when you change playlists and it has an upper limit compares to the old way.

foo_uie_graphical_browser

Reply #123
rev013 is now out. Looks like it fixed some selection, and GDI Bugs.
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

foo_uie_graphical_browser

Reply #124
rev013 is now out. Looks like it fixed some selection, and GDI Bugs.


Some display bugs when playing with the option 'Image Cache' (vertical shift of picture of 1 or 2 pixels)

but ok with Old cache mode

So, here is just a try inspired by Delicious Library style :



what about this gb layout ?