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

foo_uie_graphical_browser

Reply #75
@Yotsuya: That's a nice find.

I update my code found in my previous post to this
Code: [Select]
$puts(cpath1,$replace(%path%,%filename_ext%,*))
$puts(cpath2,$replace(%path%,%directory%\%filename_ext%,*))

$puts(nocover,components\default.png)

$puts(ox,$eval(%gb_width%-4))
$puts(oy,$eval(%gb_height%-10))
$puts(ix,$eval(%gb_width%-20))
$puts(iy,$eval(%gb_height%-14))

$draw_image(3,4,$get(ox),$get(oy),'.\components\cdcaseck3.png',255,nokeepaspect)

$if3(
$draw_image(16,6,$get(ix),$get(iy),$get(cpath1),$if(%gb_mouse_over%,150,255),nokeepaspect),
$draw_image(16,6,$get(ix),$get(iy),$get(cpath2),$if(%gb_mouse_over%,150,255),nokeepaspect),
$draw_image(16,6,$get(ix),$get(iy),$get(nocover),$if(%gb_mouse_over%,150,255),nokeepaspect)
)

$draw_image(16,6,$get(ix),$get(iy),'.\components\glareyo0.png',50,nokeepaspect)

$if(%gb_focused%,
,
$gp_set_font(Tahoma,9,b)
$gp_set_text_rendering_hint(ct)
$gp_set_smoothing_mode(1)
$gp_set_string_format(center,center)
$if(%gb_mouse_over%,
$gp_set_pen(255-255-255-255,3,,bevel)
$gp_set_brush(255-0-0-0),
$gp_set_pen(255-0-0-0,3,,bevel)
$gp_set_brush(255-255-255-255)
)
$gp_draw_string_path(%gb_group%,12,,3,4,$get(ox),$get(oy))
)
Remember to change image source vars to suit your configuration. Other settings and requirements are the same as my previous post.
BTW, somehow I feel that the popup function is a little inelegant so I don't use it.

foo_uie_graphical_browser

Reply #76
This just keeps gettting better - well done!

@Yotsuya: That's a nice find.

I update my code found in my previous post to this
Code: [Select]
$puts(cpath1,$replace(%path%,%filename_ext%,*))
$puts(cpath2,$replace(%path%,%directory%\%filename_ext%,*))

$puts(nocover,components\default.png)

$puts(ox,$eval(%gb_width%-4))
$puts(oy,$eval(%gb_height%-10))
$puts(ix,$eval(%gb_width%-20))
$puts(iy,$eval(%gb_height%-14))

$draw_image(3,4,$get(ox),$get(oy),'.\components\cdcaseck3.png',255,nokeepaspect)

$if3(
$draw_image(16,6,$get(ix),$get(iy),$get(cpath1),$if(%gb_mouse_over%,150,255),nokeepaspect),
$draw_image(16,6,$get(ix),$get(iy),$get(cpath2),$if(%gb_mouse_over%,150,255),nokeepaspect),
$draw_image(16,6,$get(ix),$get(iy),$get(nocover),$if(%gb_mouse_over%,150,255),nokeepaspect)
)

$draw_image(16,6,$get(ix),$get(iy),'.\components\glareyo0.png',50,nokeepaspect)

$if(%gb_focused%,
,
$gp_set_font(Tahoma,9,b)
$gp_set_text_rendering_hint(ct)
$gp_set_smoothing_mode(1)
$gp_set_string_format(center,center)
$if(%gb_mouse_over%,
$gp_set_pen(255-255-255-255,3,,bevel)
$gp_set_brush(255-0-0-0),
$gp_set_pen(255-0-0-0,3,,bevel)
$gp_set_brush(255-255-255-255)
)
$gp_draw_string_path(%gb_group%,12,,3,4,$get(ox),$get(oy))
)
Remember to change image source vars to suit your configuration. Other settings and requirements are the same as my previous post.
BTW, somehow I feel that the popup function is a little inelegant so I don't use it.

If you put them in this order you don't even need the $if3

$draw_image(16,6,$get(ix),$get(iy),$get(nocover),$if(%gb_mouse_over%,150,255),nokeepaspect)
$draw_image(16,6,$get(ix),$get(iy),$get(cpath2),$if(%gb_mouse_over%,150,255),nokeepaspect)
$draw_image(16,6,$get(ix),$get(iy),$get(cpath1),$if(%gb_mouse_over%,150,255),nokeepaspect)

as the later images are drawn over any earlier one(s).


I love the new popup function. And I'd love to be able to show the tracks from an album in the popup!

Using %track% %title% etc. in the popup or in the main window gives info from the 1st track - any chance of looping through the tracks in the popup window at least?

foo_uie_graphical_browser

Reply #77
Ah yeah, but when using mouse over, it will look funny. Thanks for the suggestion, though.

foo_uie_graphical_browser

Reply #78
Quote
If you put them in this order you don't even need the $if3

That's mean.. instead of draw just 1 image if cover was found, you have to draw 2 or more. (1 for nocover, 1 or more for cover) And  it's slow thing down unnecessary.

Bad idea  Oh well, people's computer are so fast these days. (Sadly, not for me)

foo_uie_graphical_browser

Reply #79
This just keeps gettting better - well done!
I love the new popup function. And I'd love to be able to show the tracks from an album in the popup!

Using %track% %title% etc. in the popup or in the main window gives info from the 1st track - any chance of looping through the tracks in the popup window at least?

For me, it will be nice if the pop up can show whether mouse over album is playing and the playing track.

Quote
If you put them in this order you don't even need the $if3

That's mean.. instead of draw just 1 image if cover was found, you have to draw 2 or more. (1 for nocover, 1 or more for cover) And it's slow thing down unnecessary.

Bad idea  Oh well, people's computer are so fast these days. (Sadly, not for me)

Sorry, we didn't notice .

foo_uie_graphical_browser

Reply #80
I've been using

$num(%gb_playlist_number%,10)

to try to keep the graphical_browser display in the same order as the active playlist.

This works well except where I have the same album in the active playlist in 2 different places. In those cases graphical-browser just displays the album once in the first location!  (Using file info on the graphical-browser display shows that each track appears twice under that display!)

Strange....

foo_uie_graphical_browser

Reply #81


Applied the latest rev009!!

I was surprised really !  Like really so much

thank you! keikonium

foo_uie_graphical_browser

Reply #82
It's a great plugin!
I intended to display some "playing" icon on the cover for the current playing album.
But, it did not work:

Code: [Select]
$if(%isplaying%,
$draw_image($eval({%gb_width%/2}-25),$eval({%gb_height%/2}-25),50,50,
D:\Imagens\Capas de Discos\play.png,
200,)
)

Does %isplaying% really work here or I'm doing something wrong?


It does not work, as it only works per track and in certain views of foobar.
To check whether an item is playing use this
Code: [Select]
$if($and($greater($add(%gb_playlist_number%,%gb_subitem_count%,1),%cwb_playing_index%),
$greater(%cwb_playing_index%,%gb_playlist_number%)),playing,not playing)

Unfortunately, it's not perfect, the updating that is. I hope the developer of graphical browser implement this http://www.bazquux.com/wiki/Foobar2000:Hoo...per_Information. If so it will be perfect.

Also here's a sneak peek at what I'm working on:

I want the popup to set its size automatically depends on the string size, too.

EDIT: that was my way to check %isplaying% for items, it's still not perfect so anyone knows a better way?

foo_uie_graphical_browser

Reply #83
is it possible to get the foobar path somehow or a relative path to the foobar directory?

very nice plugin btw. i've always been looking for something like that.

foo_uie_graphical_browser

Reply #84
Here's my new one:


Images:
Play icon
Glare image
Put them to into your foobar2000\components folder or any folder you like but remember to change the correspondent paths.

Group:
Code: [Select]
$if2(%album%,@skip)
Sort:
Code: [Select]
$num(%gb_playlist_number%,10)
Type: Vertical Scroll

Popup size: for artist display, size is your choice. Opacity: your choice.

Item size: your choice, but horizontal size should be bigger than vertical size. (preferred about double, I use 210x110)

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)

//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))

//check whether item is playing
$puts(isplaying,$if($and($strcmp(%cwb_activelist%,%cwb_playinglist%),
$greater($add(%gb_playlist_number%,%gb_subitem_count%,1),%cwb_playing_index%),
$greater(%cwb_playing_index%,%gb_playlist_number%)),
1,))
///////////////////////////////////

$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%)

$if(%gb_focused%,
$set_pen(0-0-0)
$draw_rect(0,0,$get(itemW),$get(itemH))
)

$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($get(isplaying),
$draw_image(7,6,$get(coverD),$get(coverD),$get(playIcon),128)
)

$set_font(Tahoma,9)
$draw_text(%gb_group%,$get(textX),6,$get(textW),$get(textH),right,wordbreak,word_ellipsis)
$set_font(Segoe UI,9,i)
$draw_text(%gb_subitem_count%
$ifgreater(%gb_subitem_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]
$gp_set_brush(255-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))

$gp_set_font(Segoe Print,9)
$gp_set_brush(255-218-218-218)
$gp_set_text_rendering_hint(ct)
$gp_set_string_format(center,center)
$if(%album artist%,
$gp_draw_string(by %album artist%,0,0,%gb_width%,%gb_height%),
Unknown Artist
)
Tip: you may set scroll size to your item vertical size, check "Scroll by a multiple of scroll size" and resize your foobar so items fit in nicely like mine. That way items won't get cut off when scrolling.

EDIT: @radecke: I use relative paths a bunch of times in my code, please take a look.

EDIT2: work around (dirty lol) for a rare case where wordbreak does not work right.

EDIT3: fixed another bug in detecting playing item logic.

foo_uie_graphical_browser

Reply #85
I'm trying to copy the dark blue layout in default UI - with grey text below the album cover which then turns white on focus:

Code: [Select]
$if(%gb_focused%,
$set_pen(808080,1)
  $set_brush(49-68-81)
  $round_rect(0,0,%gb_width%,%gb_height%,5,5)
$set_font(Tahoma,7)
$set_font_color(255-255-255)
$draw_text(%gb_group%,6,%gb_width%,$eval(%gb_width%-10),$eval(%gb_height%-%gb_width%-2),center,wordbreak)
$puts(tra,255)
,
$puts(tra,255)
)

$set_font(Tahoma,7)
$set_font_color(176-175-157)
$draw_text(%gb_group%,6,%gb_width%,$eval(%gb_width%-10),$eval(%gb_height%-%gb_width%-2),center,wordbreak)
,)




Thanks for your help

foo_uie_graphical_browser

Reply #86
Use this code:
Code: [Select]
$puts(tra,255)
$set_font(Tahoma,7)
$if(%gb_focused%,
$set_pen(808080,1)
  $set_brush(49-68-81)
  $round_rect(0,0,%gb_width%,%gb_height%,5,5)
$set_font_color(255-255-255)
,
$set_font_color(176-175-157)
)
$draw_text(%gb_group%,6,%gb_width%,$eval(%gb_width%-10),$eval(%gb_height%-%gb_width%-2),center,wordbreak)

A tip: Put general part outside of $if function.


foo_uie_graphical_browser

Reply #88
EDIT: @radecke: I use relative paths a bunch of times in my code, please take a look.

thanks. now i know why it didn't work for me. i thought the foobar directory was the source path but actually it's the components directory. that explains a lot

now i love this component even more

 

foo_uie_graphical_browser

Reply #89
No, the foobar is the source path. That's why I have to use "components\image.png" to access image.png in foobar components folder. If components is the source path as you said, then you only need image.png. IOW, that relative path can also be written as ".\components\image.png" which "." is the current directory which is foobar2000 path. The only component AFAIK that uses components as the source path is foo_uie_albumart. Hope that clears it up.

foo_uie_graphical_browser

Reply #90
Hello thuan, thank you for the great config 

a question, may i know which font you're using for the playlist in your SS?

thanks 

foo_uie_graphical_browser

Reply #91
No, the foobar is the source path. That's why I have to use "components\image.png" to access image.png in foobar components folder. If components is the source path as you said, then you only need image.png. IOW, that relative path can also be written as ".\components\image.png" which "." is the current directory which is foobar2000 path. The only component AFAIK that uses components as the source path is foo_uie_albumart. Hope that clears it up.


"..\PanelsUI\smooth\images\artoverlay3.png" is the only thing that works for me. i get no image if i write the path like ".\PanelsUI\smooth\images\artoverlay3.png" or "PanelsUI\smooth\images\artoverlay3.png"

however the important thing is that it works

foo_uie_graphical_browser

Reply #92
For PanelUI, relative paths start from where the PUI is.

So, In your case just use "images\artoverlay3.png" and it should work.

foo_uie_graphical_browser

Reply #93
@DiGiCharat: I use Segoe UI. This font comes with Vista or Office 2007 and maybe .NET 3.0 and 3.5 too AFAIK.

Well here's the updated version of my Graphical Browser config:
.
Popup now has album art in it.

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)

//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))

//check whether item is playing
$puts(isplaying,$if($and($strcmp(%cwb_activelist%,%cwb_playinglist%),
$greater($add(%gb_playlist_number%,%gb_subitem_count%,1),%cwb_playing_index%),
$greater(%cwb_playing_index%,%gb_playlist_number%)),
1,))
///////////////////////////////////

$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($get(isplaying),
$draw_image(7,6,$get(coverD),$get(coverD),$get(playIcon),128)
)

$set_font($get(fontName),$get(fontSize))
$draw_text($get(font) %gb_group% $get(font),$get(textX),6,$get(textW),$get(textH),right,wordbreak,word_ellipsis)
$set_font($get(fontName),$get(fontSize),i)
$draw_text(%gb_item_index%/%gb_item_count% %gb_subitem_count%
$ifgreater(%gb_subitem_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)

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

//Font setting for artist display
$gp_set_font(Segoe Print,9)
//////////////////////////////////////

$gp_set_brush(255-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_brush(255-218-218-218)
$gp_set_text_rendering_hint(ct)
$gp_set_string_format(center,center)
$if(%album artist%,
$gp_draw_string(by %album artist%,0,$get(textY),%gb_width%,$get(textH)),
Unknown Artist
)
Popup size: height should be bigger than width. I use 200x240.
Other settings and requirements are the same as [a href=\"http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=61412&view=findpost&p=551336\" target=\"_blank\"]my previous post[/url].

EDIT: Small change: make it easier to change font for item display.

foo_uie_graphical_browser

Reply #94
For PanelUI, relative paths start from where the PUI is.

So, In your case just use "images\artoverlay3.png" and it should work.


thank you. so it was just a coincidence that it worked

foo_uie_graphical_browser

Reply #95
Terrific component.

I guess the only thing I'm missing is the ability to quickly navigate to a certain album by typing a few letters of its grouping string from keyboard.

And big thanks to thuan for his config.

foo_uie_graphical_browser

Reply #96
I recently found the time to check out that awesome component and did a screenshot of the covers of all my albums. They load amazingly fast with 2gb of ram.

Check this out:
[a href="http://img187.imageshack.us/my.php?image=allalbumsmg4.jpg" target="_blank"]


foo_uie_graphical_browser

Reply #98
hey

i have many albums, that contains 2 ore more subfolders inside(like cd1, cd2). The covers are stored not in cd1, cd2, cdx subfolders but in the "main" folder.  This string
Code: [Select]
$replace(%path%,%filename_ext%,)cover.jpg
  show the cover that are stored in the same folder were the music files are stored. I want to show the covers that are stored one level higer in the directory structure. How i can di this? thx.

foo_uie_graphical_browser

Reply #99
Maybe this would work:

$replace(%path%,%filename_ext%,)../cover.jpg

or use $directory(x,n) somehow - extracts directory name from the file path x; goes up by n levels.

maybe

$directory(%path%,1)/cover.jpg