diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/models/langlistmodel.h | 4 | ||||
-rw-r--r-- | src/gui/popups/itempopup.cpp | 4 | ||||
-rw-r--r-- | src/gui/theme.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/icon.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/skilldata.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/mailviewwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/minimap.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 4 |
9 files changed, 21 insertions, 15 deletions
diff --git a/src/gui/models/langlistmodel.h b/src/gui/models/langlistmodel.h index adbb7fe98..e38c84a74 100644 --- a/src/gui/models/langlistmodel.h +++ b/src/gui/models/langlistmodel.h @@ -24,7 +24,7 @@ #include "gui/models/extendedlistmodel.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/imageloader.h" #include "utils/gettext.h" @@ -95,7 +95,7 @@ class LangListModel final : public ExtendedListModel const std::string icon = LANG_NAME[f].icon; if (!icon.empty()) { - mIcons[f] = resourceManager->getImage("graphics/flags/" + mIcons[f] = ImageLoader::getImage("graphics/flags/" + icon); } else diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index 619bd38db..9ea7b2d9a 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -42,7 +42,7 @@ #include "resources/item/item.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/imageloader.h" #include "net/beinghandler.h" #include "net/serverfeatures.h" @@ -179,7 +179,7 @@ void ItemPopup::setItem(const ItemInfo &item, if (showImage) { - Image *const image = resourceManager->getImage(combineDye2( + Image *const image = ImageLoader::getImage(combineDye2( paths.getStringValue("itemIcons").append(item.getDisplay().image), item.getDyeIconColorsString(color))); diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index c8468a26d..58840f9a8 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -37,6 +37,8 @@ #include "resources/dye/dyepalette.h" +#include "resources/loaders/imageloader.h" + #include "resources/resourcemanager/resourcemanager.h" #include "utils/dtor.h" @@ -639,7 +641,7 @@ std::string Theme::resolveThemePath(const std::string &path) Image *Theme::getImageFromTheme(const std::string &path) { - return resourceManager->getImage(resolveThemePath(path)); + return ImageLoader::getImage(resolveThemePath(path)); } ImageSet *Theme::getImageSetFromTheme(const std::string &path, diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 91727babe..bb79ccb38 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -45,6 +45,8 @@ #include "resources/db/itemdb.h" +#include "resources/loaders/imageloader.h" + #include "resources/resourcemanager/resourcemanager.h" #include "utils/stringutils.h" @@ -628,7 +630,7 @@ int BrowserBox::calcHeight() const size_t sz = str.size(); if (sz > 2 && str.substr(sz - 1) == "~") str = str.substr(0, sz - 1); - Image *const img = resourceManager->getImage(str); + Image *const img = ImageLoader::getImage(str); if (img) { img->incRef(); diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp index dee4ebebd..304533c3a 100644 --- a/src/gui/widgets/icon.cpp +++ b/src/gui/widgets/icon.cpp @@ -28,6 +28,8 @@ #include "resources/image.h" +#include "resources/loaders/imageloader.h" + #include "resources/resourcemanager/resourcemanager.h" #include "debug.h" @@ -36,7 +38,7 @@ Icon::Icon(const Widget2 *const widget, const std::string &file, const AutoRelease autoRelease) : Widget(widget), - mImage(resourceManager->getImage(file)), + mImage(ImageLoader::getImage(file)), mAutoRelease(autoRelease) { if (mImage) diff --git a/src/gui/widgets/skilldata.cpp b/src/gui/widgets/skilldata.cpp index 0360cd4bb..f412cb7a0 100644 --- a/src/gui/widgets/skilldata.cpp +++ b/src/gui/widgets/skilldata.cpp @@ -28,7 +28,7 @@ #include "resources/image.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/imageloader.h" #include "debug.h" @@ -61,7 +61,7 @@ SkillData::~SkillData() void SkillData::setIcon(const std::string &iconPath) { if (!iconPath.empty()) - icon = resourceManager->getImage(iconPath); + icon = ImageLoader::getImage(iconPath); if (!icon) { diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp index 78184c671..586703937 100644 --- a/src/gui/windows/mailviewwindow.cpp +++ b/src/gui/windows/mailviewwindow.cpp @@ -41,7 +41,7 @@ #include "resources/image.h" #include "resources/iteminfo.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/imageloader.h" #include "resources/db/itemdb.h" @@ -110,7 +110,7 @@ MailViewWindow::MailViewWindow(const MailMessage *const message) : { const ItemInfo &item = ItemDB::get(message->itemId); // +++ need use message->cards and ItemColorManager for colors - Image *const image = resourceManager->getImage(combineDye2( + Image *const image = ImageLoader::getImage(combineDye2( paths.getStringValue("itemIcons").append( item.getDisplay().image), item.getDyeIconColorsString(ItemColor_one))); diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index e21f51742..746b452fe 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -44,7 +44,7 @@ #include "resources/map/map.h" #include "resources/map/metatile.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/imageloader.h" #include "utils/gettext.h" #include "utils/physfstools.h" @@ -187,7 +187,7 @@ void Minimap::setMap(const Map *const map) } if (!minimapName.empty()) - mMapImage = resourceManager->getImage(minimapName); + mMapImage = ImageLoader::getImage(minimapName); else mMapImage = nullptr; mCustomMapImage = false; diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index 5b573d693..92a57da43 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -67,7 +67,7 @@ #include "resources/item/complexitem.h" -#include "resources/resourcemanager/resourcemanager.h" +#include "resources/loaders/imageloader.h" #include "net/npchandler.h" #include "net/packetlimiter.h" @@ -730,7 +730,7 @@ void NpcDialog::parseListItems(const std::string &itemString) else { mItems.push_back(tmp.substr(pos + 1)); - Image *const img = resourceManager->getImage(std::string( + Image *const img = ImageLoader::getImage(std::string( path).append(tmp.substr(0, pos)).append(".png")); mImages.push_back(img); } |