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

foo_uie_graphical_browser

Reply #175
New version rev015 anyway, so new readme translation.
Code: [Select]
Graphical Browser

● What this component does:
Album cover browser for the active playlist.


● Caution
Settings are per panel so if you delete a panel, the settings for that panel
also disappear.


● Sort
Blank → Whatever works.
* → Sorted by grouped strings.

If you want to arrange in the same order as the playlist → $num(%gb_playlist_number%,10)


● Popup
Transparent mode
You can apply different level of transparence to every pixel. (e.g.: transparent background
with full opacity image and text.)
I think that GDI can't be used, please use GDI+ only.
Even with GDI+, text rendering without using $gp_set_text_rendering_hint(aa) doesn't look
good enough.

Per track
Draw order:
Popup → Per track(0) → Per track(1) → ...
Rendering settings (e.g.: pen, brush, font, ...) can't be set again midway.


● Image cache methods
Old
rev011 and older way. Cache images of all items.
Image cache is purged when switching playlist.

Default
Cache images to the set size.
Image cache is not purged when switching playlist.
If the image cache reach the limit, it will be purged.


● Variables
%gb_group%
[Item], [Popup], [Per track(Popup)]
Return the group string. E.g.: If you used $if2(%album%,@skip) to group,
it will return %album%.

%gb_width%
[Item]
Item width
[Popup], [Per track(Popup)]
Popup width

%gb_height%
[Item]
Item height
[Popup], [Per track(Popup)]
Popup height

%gb_focused%
[Item], [Popup], [Per track(Popup)]
Check whether focus is on the item or not

%gb_mouse_over%
[Item]
Check whether mouse cursor is on the item or not
[Popup], [Per track(Popup)]
Probably always true

%gb_item_index%
[Item], [Popup], [Per track(Popup)]
Return item index

%gb_item_count%
[Item], [Popup], [Per track(Popup)]
Return item count

%gb_track_count%
[Sort], [Item], [Popup], [Per track(Popup)]
Return number of songs in an item

%gb_playlist_number%
[Sort], [Item], [Popup]
Return position of song in playlist for the first song in an item
[Per track(Popup)]
Return position of song in playlist

%gb_col%
[Item], [Popup], [Per track(Popup)]
Return item column number

%gb_row%
[Item], [Popup], [Per track(Popup)]
Return item row number

%gb_col_count%
[Item], [Popup], [Per track(Popup)]
Return number of columns

%gb_row_count%
[Item], [Popup], [Per track(Popup)]
Return number of rows

%gb_isplaying%
[Item], [Popup]
Return true if a song in the item is playing
[Per track (Popup)]
Return true if it is playing

%gb_track_index%
[Per track (Popup)]
Position of track in item (O based)

%gb_length%
[Sort], [Item], [Popup], [Per track(Popup)]
Total length of item/track

%gb_length_seconds%
[Sort], [Item], [Popup], [Per track(Popup)]
Total length in seconds of item/track

%gb_calc_x%
%gb_calc_y%
%gb_calc_width%
%gb_calc_height%
[Item], [Popup], [Per track(Popup)]
Dimension calculations
Values change with functions below
$calc_text
$gp_calc_string
$gp_calc_string_path
$draw_image


● About functions:
Functions are divided into GDI and GDI+. They are different in pens, brushes and points.
For GDI, to set color with "r-g-b", use a base 10 number for each color component;
otherwise use base 16 number with "rrggbb". For GDI+, to set color with "a-r-g-b",
use a base 10 number for each color component and alpha channel; otherwise use
base 16 number with "aarrggbb". If you want to draw some thing with transparency
or effects like anti-aliasing, use GDI+. Some fonts (probably OpenType fonts with
PostScript outline) can't be used in GDI+ mode. Full-width hyphen can't be
displayed right in GDI+ mode.


● GDI function
$set_font(name,size,style)
Set font
name - font name
size - font size
style - style
Set multiple styles by combining options
"b" - bold
"i" - italic
"u" - underline
"s" - strikethrough

$set_font_color(color)
Set font color
color - color

$draw_text(str,x,y)
Draw text
str - string
x - start point x coordinate
y - start point y coordinate

$draw_text(str,x,y,width,height,[option1],[option2],...)
Draw text within the set limit
str - string
x - start point x coordinate
y - start point y coordinate
width - drawing width
height - drawing height
option - other option
"bottom" - draw at bottom, needs singleline
"center" - center aligned
"end_ellipsis" - if out of limit, append "...."
"left" - left aligned
"noclip" - no clip, same as no settings for width and height
"path_ellipsis" – like end_ellipsis but used for file path
"right" – right aligned
"singleline" - display with 1 line
"top" - draw at top
"vcenter" - vertical center aligned, needs singleline
"wordbreak" - display with multiple lines
"word_ellipsis" - truncates any word that does not fit in the
rectangle and adds ellipsis.
Details at [url=http://msdn2.microsoft.com/en-us/library/ms533909.aspx]http://msdn2.microsoft.com/en-us/library/ms533909.aspx[/url]

$draw_text_blur(str,x,y,strength,[deep])
$draw_text_blur(str,x,y,width,height,strength,[deep],[option1],[option2],...)
○ Overview
Draw blurred text.
○ Arguments
str - string
x - start point x coordinate
y - start point y coordinate
strength - Blur strength (1..20)
deep - enable [1]
option - see $draw_text

$calc_text(str)
$calc_text(str,width,height,[option1],[option2],...)
Calculate size of str when drawn.
Arguments are the same as $draw_text except x and y.
Use %gb_calc_*% to obtain values after this function.

$set_pen(color)
$set_pen(color,width)
$set_pen(color,width,style)
Pen settings
color - color
width - width[1], only effective when using "solid" style
style - style["solid"]
"solid" - solid line
"dash" - dashed line
"dot" - dotted line
"dashdot" - line with alternating dashes and dots
"dashdotdot" - line  with alternating dashes and double dots
Details at [url=http://msdn2.microsoft.com/en-us/library/ms535467(VS.85).aspx]http://msdn2.microsoft.com/en-us/library/m...467(VS.85).aspx[/url]

$set_brush(color)
$set_brush(color,style)
Brush settings
color - color
style - style: if it is not set, then brush is solid
"bdiagonal" - A 45-degree upward, left-to-right line pattern
"cross" - Horizontal and vertical cross pattern
"diagcross" - 45-degree cross pattern
"fdiagonal" - A 45-degree downward, left-to-right line pattern
"horizontal" - Horizontal line pattern
"vertical" - Vertical line pattern

$draw_rect(x,y,width,height)
Draw rectangle using pen
x - start point x coordinate
y - start point y coordinate
width - width
height - height

$fill_rect(x,y,width,height)
Fill rectangle using brush
x - start point x coordinate
y - start point y coordinate
width - width
height - height

$fill_draw_rect(x,y,width,height)
Draw rectangle using pen and brush
x - start point x coordinate
y - start point y coordinate
width - width
height - height

$round_rect(x,y,width,height,ellipse_width,ellipse_height)
Draw round corner rectangle with pen and brush
x - start point x coordinate
y - start point y coordinate
width - width
height - height
ellipse_width - ellipse width
ellipse_height - ellipse height

$draw_line(x1,y1,x2,y2)
Draw line using pen, end point is not drawn.
x1 - start point x coordinate
y1 - start point y coordinate
x2 - end point x coordinate
y2 - end point y coordinate


● GDI+ function
Because pen, brush, font do not have default values, please set them up with
$gp_set_* before using.

$gp_set_pen(argb,width)
$gp_set_pen(argb,width,style,line_join)
○ Overview:
Pen settings
○ Arguments:
argb - color
width - width
style - style ["solid"]
"solid" - solid line
"dash" - dashed line
"dot" - dotted line
"dashdot" - line with alternating dashes and dots
"dashdotdot" - line  with alternating dashes and double dots
line_join - stroke corner style ["miter"]
"miter"
"bevel"
"round"

$gp_set_brush(argb)
○ Overview:
Monocolor brush setting
○ Arguments:
argb - color

$gp_set_brush(style,argb1,argb2)
○ Overview:
Hatch brush settings
○ Argument:
style - Style
Use number in range 0 ~ 53.
Details at http://msdn2.microsoft.com/en-us/library/ms534127.aspx
argb1 - Foreground color.
argb2 - Background color.

$gp_set_brush(argb1,x1,y1,argb2,x2,y2)
○ Overview:
Set brush with linear gradual effect
○ Arguments:
argb1 - color 1
x1 - color 1 x coordinate
y1 - color 1 y coordinate
argb2 - color 2
x2 - color 2 x coordinate
y2 - color 2 y coordinate

$gp_set_font(name,size)
$gp_set_font(name,size,style_1,style_2...)
○ Overview:
Font settings
○ Arguments:
name - font name
size - font size
style - style
"b" - bold
"i" - italic
"bi" - bold and italic
"u" - underline
"s" - strikethrough

$gp_set_string_format(alignment,line_alignment,[trimming])
○ Overview:
Text drawing method settings
○ Arguments:
alignment - horizontal alignment
"near" - left
"center" - center
"far" - right
line_alignment - vertical alignment
"near" - top
"center" - center
"far" - bottom
trimming - Trimming.
"character"
"word"
"ellipsis_character"
"ellipsis_word"
"ellipsis_path"

$gp_set_smoothing_mode(antialias)
○ Overview:
Shape anti-alias setting
○ Arguments:
antialias - anti-alias
0 - disable
1 - enable

$gp_set_text_rendering_hint(mode)
○ Overview:
Text rendering method setting
○ Arguments:
mode - method
"default" - default
"sb+" - single bit per pixel grid fit
"sb" - single bit per pixel
"aa+" - anti alias grid fit
"aa" - anti alias
"ct" - clear type

$gp_draw_arc(x,y,width,height,start_angle,sweep_angle)
○ Overview:
Draw arc using pen
○ Arguments:
x - top left x coordinate
y - top left y coordinate
width - width
height - height
start_angle - start angle (degree)
sweep_angle - end angle (degree)
○ Settings:
$gp_set_pen
$gp_set_smoothing_mode

$gp_draw_ellipse(x,y,width,height)
○ Overview:
Draw ellipse using pen
○ Arguments:
x - top left x coordinate
y - top left y coordinate
width - width
height - height
○ Settings:
$gp_set_pen
$gp_set_smoothing_mode

$gp_draw_line(x1,y1,x2,y2)
○ Overview:
Draw line using pen
○ Arguments:
x1 - start point x coordinate
y1 - start point y coordinate
x2 - end point x coordinate
y2 - end point y coordinate
○ Settings:
$gp_set_pen
$gp_set_smoothing_mode

$gp_draw_pie(x,y,width,height,start_angle,sweep_angle)
○ Overview:
Draw pie (fan shape) using pen
○ Arguments:
x - top left x coordinate
y - top left y coordinate
width - width
height - height
start_angle - start angle (degree)
sweep_angle - end angle (degree)
○ Settings:
$gp_set_pen
$gp_set_smoothing_mode

$gp_draw_rectangle(x,y,width,height)
○ Overview:
Draw rectangle using pen
○ Arguments:
x - top left x coordinate
y - top left y coordinate
width - width
height - height
○ Settings:
$gp_set_pen
$gp_set_smoothing_mode

$gp_draw_string(str,x,y)
$gp_draw_string(str,x,y,width,height)
○ Overview:
Draw string using brush
○ Arguments:
str - string
x - top left x coordinate
y - top left y coordinate
width - width
height - height
○ Settings:
$gp_set_font
$gp_set_brush
$gp_set_text_rendering_hint
$gp_set_string_format

$gp_calc_string(str)
$gp_calc_string(str,width,height)
○ Overview
Calculate size of str when drawn

$gp_fill_ellipse(x,y,width,height)
○ Overview:
Fill ellipse using brush
○ Arguments:
x - top left x coordinate
y - top left y coordinate
width - width
height - height
○ Settings:
$gp_set_brush
$gp_set_smoothing_mode

$gp_fill_pie(x,y,width,height,start_angle,sweep_angle)
○ Overview:
Fill pie using brush
○ Arguments:
x - top left x coordinate
y - top left y coordinate
width - width
height - height
start_angle - start angle (degree)
sweep_angle - end angle (degree)
○ Settings:
$gp_set_brush
$gp_set_smoothing_mode

$gp_fill_rectangle(x,y,width,height)
○ Overview:
Fill rectangle using brush
○ Arguments:
x - top left x coordinate
y - top left y coordinate
width - width
height - height
○ Settings:
$gp_set_brush
$gp_set_smoothing_mode

$gp_draw_string_path(str,size,mode,x,y)
$gp_draw_string_path(str,size,mode,x,y,width,height)
○ Overview:
Draw string with border.
○ Arguments:
str - string
size - character size, px unit (different from current font size)
mode - draw mode
"" - fill and border
"stroke" - only border
"fill" - only fill
x - top left x coordinate
y - top left y coordinate
width - width
height - height
○ Settings:
$gp_set_pen
$gp_set_brush
$gp_set_font
$gp_set_string_format
$gp_set_smoothing_mode
○ Examples:
$gp_set_font(Tahoma,9,b)
$gp_set_pen(ff1500ff,2,,round)
$gp_set_brush(ffddeeff)
$gp_set_string_format(center,center)
$gp_set_smoothing_mode(1)
$gp_draw_string_path(%gb_group%,16,,0,0,%gb_width%,%gb_height%)

$gp_calc_string_path(str,size,mode)
$gp_calc_string_path(str,size,mode,width,height)
○ Overview
Calculate size of str with border when drawn


● Draw image function
$draw_image(x,y,width,height,path)
$draw_image(x,y,width,height,path,alpha)
$draw_image(x,y,width,height,path,alpha,option)
$draw_image(x,y,width,height,path,alpha,option,rotate_flip)
○ Overview:
Draw image
○ Arguments:
x - starting point x coordinate
y - starting point y coordinate
width - width
height - height
path - absolute path to image, wild cards are accepted.
alpha - degree of opacity[255]
option - other options[""]
"nokeepaspect" - don't keep picture aspect ratio
"top" - draw at the top
"topright" - draw on the top right
"right" - draw from the right
"bottomright" - draw on the bottom right
"bottom" - draw at the bottom
"bottomleft" - draw on the bottom left
"left" - draw from the left
"topleft" - draw on the top left
rotate_flip - Rotation and flip [0]
0 - No rotation = Rotate right 180 degrees,
flip vertically then horizontally
1 - Rotate right 90 degrees = Rotate right 270 degrees,
flip vertically then horizontally
2 - Rotate right 180 degrees = Flip vertically then
horizontally
3 - Rotate right 270 degrees = Rotate right 90 degrees,
flip vertically then horizontally
4 - Flip horizontally = Rotate right 180 degrees,
flip vertically
5 - Rotate right 90 degrees, flip horizontally = Rotate
right 270 degrees, flip vertically
6 - Rotate right 180 degrees, flip horizontally = Flip
vertically
7 - Rotate right 270 degrees, flip horizontally = Rotate
right 90 degrees, flip vertically
○ Reference
After executing this function, you can use
%gb_calc_*% to obtain the real dimensions used.


● Other functions
$set_size(width,height)
○ Overview
Modify popup size, please use it only when drawing the popup.
Popup size is the upper limits, you can only set to smaller sizes.
%gb_width%,%gb_height% values are changed accordingly.
When width or height is 0 or less, popup won't be drawn.
○ Arguments:
width - width
height - height

$set_org(x,y)
○ Overview
Starting point setting
○ Arguments:
x - starting point x coordinate
y - starting point y coordinate

$set_clip_rect()
$set_clip_rect(x,y,width,height)
○ Overview
Only draw GDI, GDI+, and pictures inside the designated area.
Cancel this function effect by calling it with no argument.

$sum(tf)
○ Overview
Calculate sum of values designated by TitleFormat.
○ Arguments:
tf - TitleFormat
○ Example: Total number played
$sum('%play_count%')


$eval(expression)
Evaluate the expression and calculate
expression - expression
E.g.: $eval(5+3)
E.g.: $eval({%gp_width%-10}/2)
※ Divide by zero expression returns 0.
Can be used with sort

● Change logs:
2008/04/20 rev015
Added - $draw_text_blur function
Added - $set_clip_rect function
Added - "(show track menu)" action

2008/03/16 rev014
Added - $set_size function
Added - %gb_calc_x% variable
Added - %gb_calc_y% variable
Added - %gb_calc_width% variable
Added - %gb_calc_height% variable
Added - $calc_text function
Added - $gp_calc_string function
Added - $gp_calc_string_path function
Fixed - $draw_image function
Fixed - $gp_set_string_format function(trimming argument) (however, they can always be used before,
just forgot to write here…
Fixed - Several bugs fixed

2008/03/12 rev013
Fixed - Fixed the slip happens sometimes when using keyboard to jump from item to item
Fixed - When drawing in GDI mode, fixed a drawing background bug

2008/03/11 rev012
Fixed - Fatal resource leak
Added - Image cache options

2008/03/10 rev011
Added - Ability to move focus to an item when pressing the first character of %gb_group%
using keyboard
Added - Ability to add to specified playlist instead of replacing it
Fixed - Fixed a bug that prevents you to scroll in Windows 2000 (probably...)
(TL's note: not sure about the last one, the meaning is a little vague and I don't have
Windows 2000 to test)

2008/03/09 rev010
Fixed - For some reason, I changed the variable name %gb_subitem_count% to %gb_track_count%
(the one before can still be used)
Added - Function $gp_set_brush(style,argb1,argb2)
Added - Function $set_org(x,y)
Added - Popup display  transparent mode
Added - Popup delay setting
Added - Function $sum(tf)
Added - Variable %gb_isplaying%
Added - Variable %gb_track_index%
Added - Variable %gb_length%
Added - Variable %gb_length_seconds%

2008/03/02 rev009
Fixed - Fixed the bug that causes rotateflip does nothing
Fixed - Fixed behavior when there's no scroll bar
Added - Added mouse over popup.

2008/03/02 rev008
Fixed - Fixed bug that prevent the use of wild cards in $draw_image function

2008/03/02 rev007
Added - Ability to [always show|if necessary show|hide] scroll bar
Fixed - $set_font function (style)
Fixed - $draw_image function (rotate_flip)
Added - Middle mouse button action
Added - Ability to send to specified playlist
Older change logs omitted.


● Copyright
TitleFormatting Editor
Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org> All Rights Reserved
[url=http://scintilla.sourceforge.net/]http://scintilla.sourceforge.net/[/url]

very good news

foo_uie_graphical_browser

Reply #176
Can any offer some advice? I want to do random "no cover art" images, but this doesn't seem to work:

$puts(nocover,images\noalbumart$rand(10).png)

I have never used $rand function much, so I don't really know but it seems $rand function does not work on latest foobar. Guess that's it?

foo_uie_graphical_browser

Reply #177
thuan
$rand function does not work on latest foobar, you must use next one: $cwb_rand()

foo_uie_graphical_browser

Reply #178
thuan
$rand function does not work on latest foobar, you must use next one: $cwb_rand()


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(nocover1,images\noalbumart$cwb_rand(16).png)

//other image sources
$puts(glareImage,images\glare.png)
$puts(playIcon,images\av_play.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(nocover1),255,nokeepaspect)
)

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

$if($get(isplaying),
$draw_image(50,50,40,40,$get(playIcon),196)
)

$set_font(Calibri,8)
$draw_text(%gb_group%,$get(textX),6,$get(textW),$get(textH),right,wordbreak,word_ellipsis)
$set_font(Calibri,8,bi)
$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%)
)


I have about 16 "no cover" album arts that I want to use (see 5th line of code). Pretty sure this code that you  wrote. But I'm not having any luck.

foo_uie_graphical_browser

Reply #179
Have you got foo_cwb_hooks installed? It's provided by that component.

foo_uie_graphical_browser

Reply #180
Yeah I got it.

foo_uie_graphical_browser

Reply #181
That's ambiguous lol. Did you get it to work, or you have the component but it's still doesn't work? Which is it?

foo_uie_graphical_browser

Reply #182
My bad, yeah I have cwb_foo_hooks. I've tried $cwb_rand() but have gotten nothing. I've also tried $mod($cwb_rand(),16) same (visual) results.

 

foo_uie_graphical_browser

Reply #183
Well, it has nothing to do with my code as mine should work fine without random number generation. With it, it does work over here using $mod($cwb_rand(),X) with X is the number of nocover image, but with a weird though plausible glitch. That is every time an item is refreshed, the random number is changed, too, this makes it look weird. If this is what you said by visual result, then I can't help you.

If what you said is it displays nothing at all, then AFAIK, there's only another reason. That is you're using the wrong extensions for your images. Try replacing the fifth line with this
Code: [Select]
$puts(nocover1,images\noalbumart$mod($cwb_rand(),16).*)


EDIT: I have an idea, instead of using random number, you can use $crc32, something like this $mod($crc32(%gb_group%),16)

foo_uie_graphical_browser

Reply #184
My updated config:
).
Download [a href="http://www.mediafire.com/?jfbjv110kld" target="_blank"]this file
[/b] and import it.

Requirements:
* Graphical browser rev014.
* Play icon and glare images. Put them info foobar components folder, if not tweak my config to accommodate your new paths.
* Item size requirement: horizontal size is about twice of vertical size. If you see cut off album names then tweak the setting I point to in item code.
* Popup size requirement: vertical size is 54 pixels bigger than horizontal size and minimum horizontal size is 150.
* If you're using WinXP, you need to have East Asian languages support. Those rating star characters need it.


Remember to set scroll size to your item vertical size if you change my settings so that your item isn't cut off when you scroll.


I'm currently using 'thuan' script and it is really good!

I'm just wondering how can I change the cover image source to a certain name, namely cover_front.jpg instead of it uses the first image file it can locate in the music folder (as in the script uses, [cpath1]

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

foo_uie_graphical_browser

Reply #185
Change the asterisk (*) in the first part of my code, the one under
Code: [Select]
//cover sources, if you add more sources please add more $draw_image functions below
to
Code: [Select]
$puts(cpath1,$replace(%path%,%filename_ext%,cover_front.jpg))

foo_uie_graphical_browser

Reply #186
I see. Thanks for the fast reply and solution. Never thought of such good plugin and the script you had contributed though! Nice work!! 

foo_uie_graphical_browser

Reply #187
Well, it has nothing to do with my code as mine should work fine without random number generation. With it, it does work over here using $mod($cwb_rand(),X) with X is the number of nocover image, but with a weird though plausible glitch. That is every time an item is refreshed, the random number is changed, too, this makes it look weird. If this is what you said by visual result, then I can't help you.

If what you said is it displays nothing at all, then AFAIK, there's only another reason. That is you're using the wrong extensions for your images. Try replacing the fifth line with this
Code: [Select]
$puts(nocover1,images\noalbumart$mod($cwb_rand(),16).*)


EDIT: I have an idea, instead of using random number, you can use $crc32, something like this $mod($crc32(%gb_group%),16)


Oh, I never said it had anything to do with your code. The code works excellently. As a matter of fact this [/i]$mod($crc32(%gb_group%),16) helped fix my problem. Thanks a million.

foo_uie_graphical_browser

Reply #188
Hi guys, just a short question: has anyone emailed the author with the idea to config this plugin to display the Library instead of a playlist? Then upon double click it would send / add the album in question to a playlist as it does currently.

The above would basically give us a graphical browser for the libary, instead of a tree we have for now. It may also be that I'm missing something obvious, do let me know if it is possible with this / other plugins!

foo_uie_graphical_browser

Reply #189
It has been mailed before, but I don't know there'll be another version as this component has been removed from his site (the front page that is) and before that it had a message saying development of this component has ceased.

foo_uie_graphical_browser

Reply #190
In case ppl are wondering, this component does work with foobar 0.9.5.3 beta 1.

foo_uie_graphical_browser

Reply #191
I'm currently using this script:

//cover sources, if you add more sources please add more $draw_image functions below
$puts(cpath1,$replace(%path%,%filename_ext%,folder.jpg))
$puts(cpath2,$replace(%path%,%directory%\%filename_ext%,*))
$puts(cpath3,$replace(%path%,%filename_ext%,cover_front.jpg))

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

//other image sources
$puts(glareImage,D:\Program Files\foobar2000\components\glareyo0.png)
$puts(playIcon,D:\Program Files\foobar2000\components\Play-icon256-by-nagaya.png)
$puts(casing,D:\Program Files\foobar2000\components\cdcaseck3.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(cpath3),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)
$draw_image(7,6,$get(coverD),$get(coverD),$get(casing),175,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%)
)

And I have deleted the line as below because I want it to show the album title only when no cover art is available for the particular album. Any idea on how to change the script? Thanks for your help~ The script code below shows album title for all album regardless if they got cover art or not. So if a particular album already has a cover art, it would be quite annoyed for the title to show again as I identify each album according to their cover art.

$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,,4,4,$eval(%gb_width%-6),$eval(%gb_height%-6))
)

foo_uie_graphical_browser

Reply #192
Another question, what option should I set if I want it to display the track list of a particular album only in album list panel when I single click the album.

Now whenever I click on the album, what it does is it highlight the tracks of the album in my entire album library.



Moderation: Please do not inline images larger than roughly 800x600 and 80KB. Please use thumbnails and/or links for large pictures instead.

foo_uie_graphical_browser

Reply #193
Can I save the cache for the graphical browser? Coz' now everytime I restart my computer or restart foobar2k, when I scroll the cover art it seems laggy. But after a while it become smooth again.

So I assume that it delete all cache after I closing foobar2k?

foo_uie_graphical_browser

Reply #194
Your last two posts can't be done, as this component developer had decided to stop developing this component. As for your question about GB code, can you point me to the post you got the code. That code is not complete for me to work on.


foo_uie_graphical_browser

Reply #196
@D.Sync: Erh, to be honest, I can't find the code you said you had removed anywhere inside the post you linked to. I made a new one using my latest code for GB.

Import this file.
Requirements:
Previously required pictures and latest GB.

foo_uie_graphical_browser

Reply #197
Thanks for the upload~ btw how to change the color of the font when no cover art is available? It's yellow now, plan to change to white~

Another question is do you know how to BOLD the album title in NG Playlist to differentiate easily between tracks & album title.

Thanks thuan you had been a great help to me~ 

foo_uie_graphical_browser

Reply #198
Near the end of Item code pane, search for this section:
Code: [Select]
$if($get(isNoCover),
$gp_set_font(Tahoma,9,b)
$gp_set_pen(255-0-0-0,2,,round)
$gp_set_brush(255-255-255-0)
$gp_set_string_format(center,center)
$gp_set_smoothing_mode(1)
$gp_draw_string_path(%gb_group%,14,,6,6,$get(coverD),$get(coverD))
)

$gp_set_pen changes the text border color, thickness, style, and line joint (same order as parameters).
$gp_set_brush changes the text stroke color which is what you wanna change and the correct value is 255-255-255-255 (alpha-red-green-blue).
For more information, read the readme I translated.
As for NG_Playlist group format question, you can't make it bold or change its font but you can color it. If you need more info post it in Columns UI thread or PM me as this is OT.

foo_uie_graphical_browser

Reply #199
I see thanks a lot~