i see - so if i understand this correctly, panel's author has to explicitly do something to allow use of $get_global() in its formatting, right?
Yes
i thought it would work right away for most places of foobar (using these hooks in foobar 0.9).
No, I don't believe it would be possible using the global hooks.
could you maybe provide example what has to be done for track info panel to support this?
Well, something like this:
columns_ui::global_variables_list vars;
try
{
pfc::string8 str_global;
columns_ui::static_control_ptr()->get_string(columns_ui::string_global_variables, str_global);
service_ptr_t<titleformat_object> to_globals;
if (static_api_ptr_t<titleformat_compiler>()->compile(to_globals, str_global.get_ptr()))
api->format_func(...,&columns_ui::titleformat_hook_global_variables<true,false>(vars), to_globals, ...);
}
catch (const pfc::exception &)
{
//Coumns UI dead
}
api->format_func(...,&columns_ui::titleformat_hook_global_variables<false,true>(vars), to_script,...)
I didn't try and compile it, so its probably bugged. And you'd use whatever format_title function you are already using I guess.
I'll fix it for next build, but you can change your screen colour depth to 32bpp to fix it too.
ooops ...it's not my pc
But even with 32bit the ColumnsUI-buttons are far beyond the standard-buttons... not a matter of taste
Ok
The bug should be fixed in v4 too.