diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-04-02 20:35:41 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-04-02 20:35:41 +0200 |
commit | 31010d6d3ba6600860a9f6dd925ac3d8e3f2c830 (patch) | |
tree | 88e0c06f16f00e635860f1ecc7d65d8e0cf4d1de /src/gui/widgets | |
parent | bbb4c1c61863b9032af2291bff20814733995391 (diff) | |
parent | 9015268746ed9052a9dc83839b2834b5feeab166 (diff) | |
download | mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.gz mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.bz2 mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.xz mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.zip |
Merge branch '0.6'
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index 1230e47a..3105a762 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -60,7 +60,7 @@ EmoteShortcutContainer::EmoteShortcutContainer(): mEmoteImg.push_back(EmoteDB::get(i)->sprite); } - mMaxItems = EmoteDB::getLast() < MAX_ITEMS ? EmoteDB::getLast() : MAX_ITEMS; + mMaxItems = std::min(EmoteDB::getLast(), MAX_ITEMS); mBoxHeight = mBackgroundImg->getHeight(); mBoxWidth = mBackgroundImg->getWidth(); @@ -97,11 +97,10 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics) g->drawText(key, emoteX + 2, emoteY + 2, gcn::Graphics::LEFT); int emoteId = emoteShortcut->getEmote(i); - if (emoteId > 0 && emoteId <= EmoteDB::getLast()) + if (emoteId > 0 && emoteId <= EmoteDB::getLast() + 1) { mEmoteImg[emoteId - 1]->draw(g, emoteX + 2, emoteY + 10); } - } if (mEmoteMoved) diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 716dc7bc..d5e824e1 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -212,7 +212,7 @@ void ScrollArea::logic() void ScrollArea::updateAlpha() { - float alpha = std::max(config.getFloatValue("guialpha"), + float alpha = std::max(config.getFloatValue("guialpha"), Theme::instance()->getMinimumOpacity()); if (alpha != mAlpha) |