diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2021-06-09 19:41:09 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-09 19:41:09 -0500 |
| commit | 9e0a964af814fa941f04ebebbc28bdbb23977651 (patch) | |
| tree | 2ba4c962b08aed1fee29a8315776605347ee14bf /src/aoimage.cpp | |
| parent | 2adb32bb61a62bb085d5d62f4115ae21c6bb50cd (diff) | |
| parent | 2f50cd55281cfa963ea2d6fb566b1eee675c643f (diff) | |
Merge pull request #554 from AttorneyOnline/feature/mounting
Add support for mounting multiple base folders
Diffstat (limited to 'src/aoimage.cpp')
| -rw-r--r-- | src/aoimage.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/aoimage.cpp b/src/aoimage.cpp index 656528e3..82e17b98 100644 --- a/src/aoimage.cpp +++ b/src/aoimage.cpp @@ -24,21 +24,16 @@ AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app, bool make_static) : Q AOImage::~AOImage() {} -bool AOImage::set_image(QString p_path, QString p_misc) +bool AOImage::set_image(QString p_image, QString p_misc) { - // Check if the user wants animated themes - if (!is_static && ao_app->get_animated_theme()) - // We want an animated image - p_path = ao_app->get_image(p_path, ao_app->current_theme, ao_app->get_subtheme(), ao_app->default_theme, p_misc); - else - // Grab a static variant of the image - p_path = ao_app->get_image_path(ao_app->get_asset_paths(p_path, ao_app->current_theme, ao_app->get_subtheme(), ao_app->default_theme, p_misc), true); + p_image = ao_app->get_image(p_image, ao_app->current_theme, ao_app->get_subtheme(), + ao_app->default_theme, p_misc, "", "", is_static || !ao_app->get_animated_theme()); - if (!file_exists(p_path)) { - qDebug() << "Warning: Image" << p_path << "not found! Can't set!"; + if (!file_exists(p_image)) { + qDebug() << "Warning: Image" << p_image << "not found! Can't set!"; return false; } - path = p_path; + path = p_image; if (!is_static) { movie->stop(); movie->setFileName(path); |
