diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-23 22:48:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:17 +0300 |
commit | d3994b21fda3e7d8ba417a382fc8f065a7bf1c52 (patch) | |
tree | 420c78c8ceda39895cce60849e3aeafedd41f081 /src/gui/widgets | |
parent | 576b7dca4676ba2c1ea63afb6bbc96fd11183048 (diff) | |
download | plus-d3994b21fda3e7d8ba417a382fc8f065a7bf1c52.tar.gz plus-d3994b21fda3e7d8ba417a382fc8f065a7bf1c52.tar.bz2 plus-d3994b21fda3e7d8ba417a382fc8f065a7bf1c52.tar.xz plus-d3994b21fda3e7d8ba417a382fc8f065a7bf1c52.zip |
improve some mode methods in Client.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/button.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/chattab.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/checkbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/dropshortcutcontainer.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/guitable.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/itemshortcutcontainer.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/listbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/playerbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/radiobutton.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/shoplistbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/slider.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/spellshortcutcontainer.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/tab.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/textfield.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/textpreview.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 2 |
20 files changed, 36 insertions, 36 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index ae6886e72..ed9ac0580 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -283,7 +283,7 @@ void Button::loadImage(const std::string &imageName) void Button::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 37e94ef1b..1cb2e9d82 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -308,8 +308,8 @@ void ChatTab::chatLog(std::string line, Own own, if ((getAllowHighlight() || own == BY_GM) && (this != tabArea->getSelectedTab() - || (Client::getIsMinimized() || (!Client::getMouseFocused() - && !Client::getInputFocused())))) + || (client->getIsMinimized() || (!client->getMouseFocused() + && !client->getInputFocused())))) { if (own == BY_GM) { @@ -323,7 +323,7 @@ void ChatTab::chatLog(std::string line, Own own, chatWindow->unHideWindow(); playNewMessageSound(); } - Client::newChatMessage(); + client->newChatMessage(); } } } diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index b9abe45fa..f1ab408fe 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -109,7 +109,7 @@ void CheckBox::draw(gcn::Graphics* graphics) void CheckBox::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index e8d4006a2..0b67958df 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -196,7 +196,7 @@ DropDown::~DropDown() void DropDown::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index e26183116..d0bf896eb 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -61,7 +61,7 @@ DropShortcutContainer::DropShortcutContainer(): if (mBackgroundImg) { - mBackgroundImg->setAlpha(Client::getGuiAlpha()); + mBackgroundImg->setAlpha(client->getGuiAlpha()); mBoxHeight = mBackgroundImg->getHeight(); mBoxWidth = mBackgroundImg->getWidth(); } @@ -98,9 +98,9 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics) return; BLOCK_START("DropShortcutContainer::draw") - if (Client::getGuiAlpha() != mAlpha) + if (client->getGuiAlpha() != mAlpha) { - mAlpha = Client::getGuiAlpha(); + mAlpha = client->getGuiAlpha(); if (mBackgroundImg) mBackgroundImg->setAlpha(mAlpha); } diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index 10ef44f6a..1353e6317 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -60,7 +60,7 @@ EmoteShortcutContainer::EmoteShortcutContainer(): "item_shortcut_background.xml", "background.xml"); if (mBackgroundImg) - mBackgroundImg->setAlpha(Client::getGuiAlpha()); + mBackgroundImg->setAlpha(client->getGuiAlpha()); // Setup emote sprites for (int i = 0; i <= EmoteDB::getLast(); i++) @@ -109,8 +109,8 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics) return; BLOCK_START("EmoteShortcutContainer::draw") - mAlpha = Client::getGuiAlpha(); - if (Client::getGuiAlpha() != mAlpha && mBackgroundImg) + mAlpha = client->getGuiAlpha(); + if (client->getGuiAlpha() != mAlpha && mBackgroundImg) mBackgroundImg->setAlpha(mAlpha); Graphics *const g = static_cast<Graphics *const>(graphics); diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index e3dda4162..473899b29 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -299,8 +299,8 @@ void GuiTable::draw(gcn::Graphics* graphics) return; BLOCK_START("GuiTable::draw") - if (Client::getGuiAlpha() != mAlpha) - mAlpha = Client::getGuiAlpha(); + if (client->getGuiAlpha() != mAlpha) + mAlpha = client->getGuiAlpha(); const gcn::Rectangle &rect = mDimension; const int width = rect.width; diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 517c783a0..3d36caafe 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -72,7 +72,7 @@ ItemShortcutContainer::ItemShortcutContainer(const unsigned number) : if (mBackgroundImg) { - mBackgroundImg->setAlpha(Client::getGuiAlpha()); + mBackgroundImg->setAlpha(client->getGuiAlpha()); mBoxHeight = mBackgroundImg->getHeight(); mBoxWidth = mBackgroundImg->getWidth(); } @@ -118,8 +118,8 @@ void ItemShortcutContainer::draw(gcn::Graphics *graphics) return; } - mAlpha = Client::getGuiAlpha(); - if (Client::getGuiAlpha() != mAlpha) + mAlpha = client->getGuiAlpha(); + if (client->getGuiAlpha() != mAlpha) { if (mBackgroundImg) mBackgroundImg->setAlpha(mAlpha); diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index 51751c463..e283d5db0 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -77,7 +77,7 @@ ListBox::~ListBox() void ListBox::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp index 20260b9ac..6a5c815d4 100644 --- a/src/gui/widgets/playerbox.cpp +++ b/src/gui/widgets/playerbox.cpp @@ -126,9 +126,9 @@ void PlayerBox::draw(gcn::Graphics *graphics) mBeing->drawSpriteAt(static_cast<Graphics*>(graphics), x, y); } - if (Client::getGuiAlpha() != mAlpha) + if (client->getGuiAlpha() != mAlpha) { - const float alpha = Client::getGuiAlpha(); + const float alpha = client->getGuiAlpha(); for (int a = 0; a < 9; a++) { if (mBackground.grid[a]) diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index f76c9610e..33e27a0d9 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -129,7 +129,7 @@ void ProgressBar::logic() void ProgressBar::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); mAlpha = alpha; } diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index 08561d56c..c8d833a64 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -90,7 +90,7 @@ RadioButton::~RadioButton() void RadioButton::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 76d883216..98b58f51c 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -234,7 +234,7 @@ void ScrollArea::logic() void ScrollArea::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (alpha != mAlpha) diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp index b0f58bd5f..6cfff4727 100644 --- a/src/gui/widgets/shoplistbox.cpp +++ b/src/gui/widgets/shoplistbox.cpp @@ -90,8 +90,8 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) return; } - if (Client::getGuiAlpha() != mAlpha) - mAlpha = Client::getGuiAlpha(); + if (client->getGuiAlpha() != mAlpha) + mAlpha = client->getGuiAlpha(); const int alpha = static_cast<int>(mAlpha * 255.0f); Graphics *graphics = static_cast<Graphics*>(gcnGraphics); diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index e8ea8ea25..00b55f936 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -94,7 +94,7 @@ void Slider::init() void Slider::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (alpha != mAlpha) diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index afd4e14f4..31d0a716b 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -64,7 +64,7 @@ SpellShortcutContainer::SpellShortcutContainer(const unsigned number) : if (mBackgroundImg) { - mBackgroundImg->setAlpha(Client::getGuiAlpha()); + mBackgroundImg->setAlpha(client->getGuiAlpha()); mBoxHeight = mBackgroundImg->getHeight(); mBoxWidth = mBackgroundImg->getWidth(); } @@ -98,9 +98,9 @@ void SpellShortcutContainer::draw(gcn::Graphics *graphics) return; BLOCK_START("SpellShortcutContainer::draw") - if (Client::getGuiAlpha() != mAlpha) + if (client->getGuiAlpha() != mAlpha) { - mAlpha = Client::getGuiAlpha(); + mAlpha = client->getGuiAlpha(); if (mBackgroundImg) mBackgroundImg->setAlpha(mAlpha); } diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index bce4ae11f..99a69897d 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -142,7 +142,7 @@ void Tab::init() void Tab::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (alpha != mAlpha) diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 0fec552e3..37629e44e 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -119,7 +119,7 @@ TextField::~TextField() void TextField::updateAlpha() { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (alpha != mAlpha) @@ -550,7 +550,7 @@ void TextField::fontChanged() void TextField::mousePressed(gcn::MouseEvent &mouseEvent) { #ifdef ANDROID - if (!Client::isKeyboardVisible()) + if (!client->isKeyboardVisible()) inputManager.executeAction(Input::KEY_SHOW_KEYBOARD); #endif if (mouseEvent.getButton() == gcn::MouseEvent::RIGHT) @@ -578,7 +578,7 @@ void TextField::mousePressed(gcn::MouseEvent &mouseEvent) void TextField::focusGained(const gcn::Event &event A_UNUSED) { #ifdef ANDROID - if (!Client::isKeyboardVisible()) + if (!client->isKeyboardVisible()) inputManager.executeAction(Input::KEY_SHOW_KEYBOARD); #endif } diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp index 11de5b553..e788f1f4c 100644 --- a/src/gui/widgets/textpreview.cpp +++ b/src/gui/widgets/textpreview.cpp @@ -83,8 +83,8 @@ TextPreview::~TextPreview() void TextPreview::draw(gcn::Graphics* graphics) { BLOCK_START("TextPreview::draw") - if (Client::getGuiAlpha() != mAlpha) - mAlpha = Client::getGuiAlpha(); + if (client->getGuiAlpha() != mAlpha) + mAlpha = client->getGuiAlpha(); Graphics *const g = static_cast<Graphics*>(graphics); const int intAlpha = static_cast<int>(mAlpha * 255.0f); diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index ad510d363..485f875fc 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -1086,7 +1086,7 @@ bool Window::isResizeAllowed(const gcn::MouseEvent &event) const int Window::getGuiAlpha() const { - const float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(client->getGuiAlpha(), Theme::instance()->getMinimumOpacity()); return static_cast<int>(alpha * 255.0f); } |