summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp6
-rw-r--r--src/gui/widgets/desktop.cpp7
-rw-r--r--src/gui/widgets/emotepage.cpp2
-rw-r--r--src/gui/widgets/icon.cpp2
-rw-r--r--src/gui/widgets/skilldata.cpp3
5 files changed, 8 insertions, 12 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index d5eb6b89a..ea6ca7be4 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -121,7 +121,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
mSkin = theme->load(skin, "browserbox.xml");
if (mInstances == 0)
{
- mEmotes = ResourceManager::getInstance()->getImageSet(
+ mEmotes = resourceManager->getImageSet(
"graphics/sprites/chatemotes.png", 17, 18);
}
mInstances ++;
@@ -570,8 +570,6 @@ int BrowserBox::calcHeight()
Color selColor[2] = {mForegroundColor, mForegroundColor2};
const Color textColor[2] = {mForegroundColor, mForegroundColor2};
- ResourceManager *const resman = ResourceManager::getInstance();
-
mLineParts.clear();
FOR_EACH (TextRowCIter, i, mTextRows)
@@ -601,7 +599,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 = resman->getImage(str);
+ Image *const img = resourceManager->getImage(str);
if (img)
{
img->incRef();
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 18cb7b138..9fdc11a61 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -172,10 +172,9 @@ void Desktop::setBestFittingWallpaper()
if (nWallPaper)
{
- ResourceManager *const resman = ResourceManager::getInstance();
if (mWallpaper)
{
- resman->decRefDelete(mWallpaper);
+ resourceManager->decRefDelete(mWallpaper);
mWallpaper = nullptr;
}
@@ -188,12 +187,12 @@ void Desktop::setBestFittingWallpaper()
|| nWallPaper->getHeight() != height))
{
// We rescale to obtain a fullscreen wallpaper...
- Image *const newRsclWlPpr = resman->getRescaled(
+ Image *const newRsclWlPpr = resourceManager->getRescaled(
nWallPaper, width, height);
if (newRsclWlPpr)
{
- resman->decRefDelete(nWallPaper);
+ resourceManager->decRefDelete(nWallPaper);
// We replace the resource in the resource manager
mWallpaper = newRsclWlPpr;
}
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index f40a855ec..7a9eee261 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -39,7 +39,7 @@ EmotePage::EmotePage(const Widget2 *const widget) :
Widget(widget),
MouseListener(),
WidgetListener(),
- mEmotes(ResourceManager::getInstance()->getImageSet(
+ mEmotes(resourceManager->getImageSet(
"graphics/sprites/chatemotes.png", emoteWidth, emoteHeight)),
mVertexes(new ImageCollection),
mSelectedIndex(-1)
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 4be9ae127..5876b1201 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -32,7 +32,7 @@
Icon::Icon(const Widget2 *const widget,
const std::string &file) :
Widget(widget),
- mImage(ResourceManager::getInstance()->getImage(file))
+ mImage(resourceManager->getImage(file))
{
if (mImage)
{
diff --git a/src/gui/widgets/skilldata.cpp b/src/gui/widgets/skilldata.cpp
index 6137d768b..826d1d719 100644
--- a/src/gui/widgets/skilldata.cpp
+++ b/src/gui/widgets/skilldata.cpp
@@ -59,9 +59,8 @@ SkillData::~SkillData()
void SkillData::setIcon(const std::string &iconPath)
{
- ResourceManager *const res = ResourceManager::getInstance();
if (!iconPath.empty())
- icon = res->getImage(iconPath);
+ icon = resourceManager->getImage(iconPath);
if (!icon)
{