Well, this is the first component that makes me go against my KISS principle. Here's my code:
$puts(imagePath,
$if($cwb_fileexists($replace(%path%,%filename_ext%,)front.jpg),
$replace(%path%,%filename_ext%,)front.jpg,
$if($cwb_fileexists($replace(%path%,%filename_ext%,)cover.jpg),
$replace(%path%,%filename_ext%,)cover.jpg,
$if($cwb_fileexists($replace(%path%,%filename_ext%,)folder.jpg),
$replace(%path%,%filename_ext%,)folder.jpg,
$if($cwb_fileexists($replace(%path%,%filename_ext%,)front.png),
$replace(%path%,%filename_ext%,)front.png,
$if($cwb_fileexists($replace(%path%,%filename_ext%,)cover.png),
$replace(%path%,%filename_ext%,)cover.png,
$if($cwb_fileexists($replace(%path%,%filename_ext%,)folder.png),
$replace(%path%,%filename_ext%,)folder.png,
$if($cwb_fileexists($replace(%path%,%directory%\%filename_ext%,)front.jpg),
$replace(%path%,%directory%\%filename_ext%,)front.jpg,
$if($cwb_fileexists($replace(%path%,%directory%\%filename_ext%,)cover.jpg),
$replace(%path%,%directory%\%filename_ext%,)cover.jpg,
$if($cwb_fileexists($replace(%path%,%directory%\%filename_ext%,)folder.jpg),
$replace(%path%,%directory%\%filename_ext%,)folder.jpg,
$if($cwb_fileexists($replace(%path%,%directory%\%filename_ext%,)front.png),
$replace(%path%,%directory%\%filename_ext%,)front.png,
$if($cwb_fileexists($replace(%path%,%directory%\%filename_ext%,)cover.png),
$replace(%path%,%directory%\%filename_ext%,)cover.png,
$if($cwb_fileexists($replace(%path%,%directory%\%filename_ext%,)folder.png),
$replace(%path%,%directory%\%filename_ext%,)folder.png,
'.\components\default.png'
)
)
)
)
)
)
)
)
)
)
)
)
)
$draw_image(0,0,%gb_height%,%gb_height%,
$get(imagePath),
$if(%gb_focused%,255,128)
)
$if(%gb_mouse_over%,
$gp_set_pen(669800ff,4)
$gp_draw_rectangle(0,0,%gb_width%,%gb_height%)
,)
$if(%gb_focused%,
$set_pen(000000,4)
$draw_rect(0,0,%gb_width%,%gb_height%)
,
$gp_set_font(Tahoma,9)
$gp_set_text_rendering_hint(ct)
$gp_set_string_format(center,center)
$gp_set_brush(66000000)
$gp_draw_string(%gb_group%,3,3,$eval(%gb_width%-6),$eval(%gb_height%-6))
$gp_set_brush(ff000000)
$gp_draw_string(%gb_group%,2,2,$eval(%gb_width%-6),$eval(%gb_height%-6))
)
This code display inactive albums with half transparent covers and album names. Active one is shown normally and without caption.