Fix charlayer regression not allowing us to *directly* refer to an emote we want to use with a file path (base/misc/blank for example)

Actually use the helper funcs for searching images instead of reimplementing the same thing
This commit is contained in:
Crystalwarrior 2021-04-22 19:02:07 +03:00
parent 3e4de5da62
commit d2c0c4fa0d

View File

@ -197,20 +197,20 @@ void CharLayer::load_image(QString p_filename, QString p_charname,
<< " continuous: " << continuous; << " continuous: " << continuous;
#endif #endif
QStringList pathlist = { QStringList pathlist = {
ao_app->get_image_suffix(ao_app->get_character_path( current_emote, // The path by itself
p_charname, prefix + current_emote)), // Default path ao_app->get_character_path(
ao_app->get_image_suffix(ao_app->get_character_path( p_charname, prefix + current_emote), // Default path
ao_app->get_character_path(
p_charname, p_charname,
prefix + "/" + current_emote)), // Path check if it's categorized prefix + "/" + current_emote), // Path check if it's categorized
// into a folder // into a folder
ao_app->get_image_suffix(ao_app->get_character_path( ao_app->get_character_path(
p_charname, p_charname,
current_emote)), // Just use the non-prefixed image, animated or not current_emote), // Just use the non-prefixed image, animated or not
ao_app->get_image_suffix( ao_app->get_theme_path("placeholder"), // Theme placeholder path
ao_app->get_theme_path("placeholder")), // Theme placeholder path ao_app->get_theme_path(
ao_app->get_image_suffix(ao_app->get_theme_path( "placeholder", ao_app->default_theme)}; // Default theme placeholder path
"placeholder", ao_app->default_theme))}; // Default theme placeholder path start_playback(ao_app->get_image_path(pathlist));
start_playback(find_image(pathlist));
} }
void SplashLayer::load_image(QString p_filename, QString p_charname, void SplashLayer::load_image(QString p_filename, QString p_charname,