diff options
Diffstat (limited to 'aomovie.cpp')
| -rw-r--r-- | aomovie.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/aomovie.cpp b/aomovie.cpp index 9e1b64e..90c3701 100644 --- a/aomovie.cpp +++ b/aomovie.cpp @@ -20,13 +20,19 @@ void AOMovie::set_play_once(bool p_play_once) play_once = p_play_once; } -void AOMovie::play(QString p_gif, QString p_char) +void AOMovie::play(QString p_gif, QString p_char, QString p_custom_theme) { m_movie->stop(); QString gif_path; - QString custom_path = ao_app->get_character_path(p_char) + p_gif + ".gif"; + QString custom_path; + if (p_gif == "custom") + custom_path = ao_app->get_character_path(p_char) + p_gif + ".gif"; + else + custom_path = ao_app->get_character_path(p_char) + p_gif + "_bubble.gif"; + + QString custom_theme_path = ao_app->get_base_path() + "themes/" + p_custom_theme + "/" + p_gif + ".gif"; QString theme_path = ao_app->get_theme_path() + p_gif + ".gif"; QString default_theme_path = ao_app->get_default_theme_path() + p_gif + ".gif"; QString placeholder_path = ao_app->get_theme_path() + "placeholder.gif"; @@ -34,6 +40,8 @@ void AOMovie::play(QString p_gif, QString p_char) if (file_exists(custom_path)) gif_path = custom_path; + else if (file_exists(custom_theme_path)) + gif_path = custom_theme_path; else if (file_exists(theme_path)) gif_path = theme_path; else if (file_exists(default_theme_path)) |
