summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp2
-rw-r--r--src/gui/widgets/avatarlistbox.h2
-rw-r--r--src/gui/widgets/browserbox.cpp13
-rw-r--r--src/gui/widgets/browserbox.h2
-rw-r--r--src/gui/widgets/button.cpp8
-rw-r--r--src/gui/widgets/button.h2
-rw-r--r--src/gui/widgets/checkbox.cpp4
-rw-r--r--src/gui/widgets/checkbox.h4
-rw-r--r--src/gui/widgets/colorpage.cpp2
-rw-r--r--src/gui/widgets/colorpage.h2
-rw-r--r--src/gui/widgets/desktop.cpp2
-rw-r--r--src/gui/widgets/desktop.h2
-rw-r--r--src/gui/widgets/dropdown.cpp6
-rw-r--r--src/gui/widgets/dropdown.h6
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/dropshortcutcontainer.h2
-rw-r--r--src/gui/widgets/emotepage.cpp2
-rw-r--r--src/gui/widgets/emotepage.h2
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.h2
-rw-r--r--src/gui/widgets/extendedlistbox.cpp5
-rw-r--r--src/gui/widgets/extendedlistbox.h2
-rw-r--r--src/gui/widgets/guitable.cpp5
-rw-r--r--src/gui/widgets/guitable.h2
-rw-r--r--src/gui/widgets/icon.cpp2
-rw-r--r--src/gui/widgets/icon.h2
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.h2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h2
-rw-r--r--src/gui/widgets/label.cpp2
-rw-r--r--src/gui/widgets/label.h2
-rw-r--r--src/gui/widgets/listbox.cpp5
-rw-r--r--src/gui/widgets/listbox.h2
-rw-r--r--src/gui/widgets/passwordfield.cpp2
-rw-r--r--src/gui/widgets/passwordfield.h2
-rw-r--r--src/gui/widgets/playerbox.cpp4
-rw-r--r--src/gui/widgets/playerbox.h4
-rw-r--r--src/gui/widgets/popup.cpp2
-rw-r--r--src/gui/widgets/popup.h2
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/progressindicator.cpp2
-rw-r--r--src/gui/widgets/progressindicator.h2
-rw-r--r--src/gui/widgets/radiobutton.cpp4
-rw-r--r--src/gui/widgets/radiobutton.h4
-rw-r--r--src/gui/widgets/scrollarea.cpp26
-rw-r--r--src/gui/widgets/scrollarea.h26
-rw-r--r--src/gui/widgets/shoplistbox.cpp2
-rw-r--r--src/gui/widgets/shoplistbox.h2
-rw-r--r--src/gui/widgets/shortcutcontainer.h2
-rw-r--r--src/gui/widgets/slider.cpp2
-rw-r--r--src/gui/widgets/slider.h2
-rw-r--r--src/gui/widgets/sliderlist.cpp2
-rw-r--r--src/gui/widgets/sliderlist.h2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.h2
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.h2
-rw-r--r--src/gui/widgets/tabs/tab.cpp2
-rw-r--r--src/gui/widgets/tabs/tab.h2
-rw-r--r--src/gui/widgets/textbox.cpp2
-rw-r--r--src/gui/widgets/textbox.h2
-rw-r--r--src/gui/widgets/textfield.cpp12
-rw-r--r--src/gui/widgets/textfield.h6
-rw-r--r--src/gui/widgets/textpreview.cpp2
-rw-r--r--src/gui/widgets/textpreview.h2
-rw-r--r--src/gui/widgets/window.cpp12
-rw-r--r--src/gui/widgets/window.h4
-rw-r--r--src/gui/widgets/windowcontainer.cpp2
-rw-r--r--src/gui/widgets/windowcontainer.h2
71 files changed, 135 insertions, 127 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 4a477b802..e6f03493f 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -90,7 +90,7 @@ AvatarListBox::~AvatarListBox()
}
}
-void AvatarListBox::draw(gcn::Graphics *gcnGraphics)
+void AvatarListBox::draw(Graphics *gcnGraphics)
{
BLOCK_START("AvatarListBox::draw")
if (!mListModel || !player_node)
diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h
index 99c1132b2..46e5c8dea 100644
--- a/src/gui/widgets/avatarlistbox.h
+++ b/src/gui/widgets/avatarlistbox.h
@@ -53,7 +53,7 @@ public:
/**
* Draws the list box.
*/
- void draw(gcn::Graphics *gcnGraphics) override final;
+ void draw(Graphics *gcnGraphics) override final;
void mousePressed(gcn::MouseEvent &event) override final;
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index d7ce9ab12..e0fbf3d17 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -37,10 +37,11 @@
#include "utils/stringutils.h"
#include "utils/timer.h"
-#include "gui/base/graphics.hpp"
#include "gui/base/font.hpp"
#include "gui/base/cliprectangle.hpp"
+#include "render/graphics.h"
+
#include <algorithm>
#include "debug.h"
@@ -446,13 +447,15 @@ void BrowserBox::mouseMoved(gcn::MouseEvent &event)
? static_cast<int>(i - mLinks.begin()) : -1;
}
-void BrowserBox::draw(gcn::Graphics *graphics)
+void BrowserBox::draw(Graphics *graphics)
{
BLOCK_START("BrowserBox::draw")
- const gcn::ClipRectangle &cr = graphics->getCurrentClipArea();
+ const gcn::ClipRectangle *const cr = graphics->getCurrentClipArea();
+ if (!cr)
+ return;
Graphics *const graphics2 = static_cast<Graphics *const>(graphics);
- mYStart = cr.y - cr.yOffset;
- const int yEnd = mYStart + cr.height;
+ mYStart = cr->y - cr->yOffset;
+ const int yEnd = mYStart + cr->height;
if (mYStart < 0)
mYStart = 0;
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index deefd886a..85ce9b96b 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -165,7 +165,7 @@ class BrowserBox final : public gcn::Widget,
/**
* Draws the browser box.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
void updateHeight();
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index faefd6f6c..8954ecf8e 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -350,7 +350,7 @@ void Button::updateAlpha()
}
}
-void Button::draw(gcn::Graphics *graphics)
+void Button::draw(Graphics *graphics)
{
BLOCK_START("Button::draw")
int mode;
@@ -437,7 +437,7 @@ void Button::draw(gcn::Graphics *graphics)
switch (mAlignment)
{
default:
- case gcn::Graphics::LEFT:
+ case Graphics::LEFT:
{
if (mImages)
{
@@ -450,7 +450,7 @@ void Button::draw(gcn::Graphics *graphics)
}
break;
}
- case gcn::Graphics::CENTER:
+ case Graphics::CENTER:
{
const int width1 = font->getWidth(mCaption);
if (mImages)
@@ -465,7 +465,7 @@ void Button::draw(gcn::Graphics *graphics)
}
break;
}
- case gcn::Graphics::RIGHT:
+ case Graphics::RIGHT:
{
const int width1 = font->getWidth(mCaption);
textX = width - width1 - padding;
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index aeec63b82..949993a48 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -102,7 +102,7 @@ class Button final : public gcn::Button,
/**
* Draws the button.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Update the alpha value to the button components.
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index fa227f5ca..e72296516 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -94,7 +94,7 @@ CheckBox::~CheckBox()
}
}
-void CheckBox::draw(gcn::Graphics *const graphics)
+void CheckBox::draw(Graphics *const graphics)
{
BLOCK_START("CheckBox::draw")
drawBox(graphics);
@@ -129,7 +129,7 @@ void CheckBox::updateAlpha()
}
}
-void CheckBox::drawBox(gcn::Graphics *const graphics)
+void CheckBox::drawBox(Graphics *const graphics)
{
if (!mSkin || !mDrawBox)
return;
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index d0864d0d5..a49c38d47 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -59,7 +59,7 @@ class CheckBox final : public gcn::CheckBox,
/**
* Draws the caption, then calls drawBox to draw the check box.
*/
- void draw(gcn::Graphics *const graphics) override final;
+ void draw(Graphics *const graphics) override final;
/**
* Update the alpha value to the checkbox components.
@@ -69,7 +69,7 @@ class CheckBox final : public gcn::CheckBox,
/**
* Draws the check box, not the caption.
*/
- void drawBox(gcn::Graphics *const graphics);
+ void drawBox(Graphics *const graphics);
/**
* Called when the mouse enteres the widget area.
diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp
index 9730f7006..1d85874df 100644
--- a/src/gui/widgets/colorpage.cpp
+++ b/src/gui/widgets/colorpage.cpp
@@ -47,7 +47,7 @@ ColorPage::~ColorPage()
{
}
-void ColorPage::draw(gcn::Graphics *graphics)
+void ColorPage::draw(Graphics *graphics)
{
BLOCK_START("ColorPage::draw")
diff --git a/src/gui/widgets/colorpage.h b/src/gui/widgets/colorpage.h
index c1c90eddf..84a3011a9 100644
--- a/src/gui/widgets/colorpage.h
+++ b/src/gui/widgets/colorpage.h
@@ -36,7 +36,7 @@ class ColorPage final : public ListBox
~ColorPage();
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
void resetAction();
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 32c8a4988..4a4a73b53 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -103,7 +103,7 @@ void Desktop::widgetResized(const gcn::Event &event A_UNUSED)
setBestFittingWallpaper();
}
-void Desktop::draw(gcn::Graphics *graphics)
+void Desktop::draw(Graphics *graphics)
{
BLOCK_START("Desktop::draw")
Graphics *const g = static_cast<Graphics *const>(graphics);
diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h
index 88034fbbc..6982ce525 100644
--- a/src/gui/widgets/desktop.h
+++ b/src/gui/widgets/desktop.h
@@ -61,7 +61,7 @@ class Desktop final : public Container, private gcn::WidgetListener
void widgetResized(const gcn::Event &event) override final;
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
void postInit();
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 3669d3eab..354c88423 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -214,7 +214,7 @@ void DropDown::updateAlpha()
}
}
-void DropDown::draw(gcn::Graphics* graphics)
+void DropDown::draw(Graphics* graphics)
{
BLOCK_START("DropDown::draw")
int h;
@@ -286,7 +286,7 @@ void DropDown::draw(gcn::Graphics* graphics)
BLOCK_END("DropDown::draw")
}
-void DropDown::drawFrame(gcn::Graphics *graphics)
+void DropDown::drawFrame(Graphics *graphics)
{
BLOCK_START("DropDown::drawFrame")
const int bs2 = getFrameSize();
@@ -296,7 +296,7 @@ void DropDown::drawFrame(gcn::Graphics *graphics)
BLOCK_END("DropDown::drawFrame")
}
-void DropDown::drawButton(gcn::Graphics *graphics)
+void DropDown::drawButton(Graphics *graphics)
{
const int height = mDroppedDown ? mFoldedUpHeight : mDimension.height;
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index da2eb64f9..af566fb69 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -82,9 +82,9 @@ class DropDown final : public gcn::ActionListener,
*/
void updateAlpha();
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
- void drawFrame(gcn::Graphics *graphics) override final;
+ void drawFrame(Graphics *graphics) override final;
// Inherited from KeyListener
@@ -142,7 +142,7 @@ class DropDown final : public gcn::ActionListener,
*
* @param graphics a Graphics object to draw with.
*/
- void drawButton(gcn::Graphics *graphics);
+ void drawButton(Graphics *graphics);
PopupList *mPopup;
gcn::Color mShadowColor;
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index 857eed024..892a74638 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -94,7 +94,7 @@ void DropShortcutContainer::setWidget2(const Widget2 *const widget)
mUnEquipedColor2 = getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE);
}
-void DropShortcutContainer::draw(gcn::Graphics *graphics)
+void DropShortcutContainer::draw(Graphics *graphics)
{
if (!dropShortcut)
return;
diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h
index b5a144cba..6b7a9f151 100644
--- a/src/gui/widgets/dropshortcutcontainer.h
+++ b/src/gui/widgets/dropshortcutcontainer.h
@@ -50,7 +50,7 @@ class DropShortcutContainer final : public ShortcutContainer
/**
* Draws the items.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Handles mouse when dragged.
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index f2f84ed56..869ae5d08 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -59,7 +59,7 @@ EmotePage::~EmotePage()
mVertexes = nullptr;
}
-void EmotePage::draw(gcn::Graphics *graphics)
+void EmotePage::draw(Graphics *graphics)
{
BLOCK_START("EmotePage::draw")
diff --git a/src/gui/widgets/emotepage.h b/src/gui/widgets/emotepage.h
index 1603bab5e..9cd2867aa 100644
--- a/src/gui/widgets/emotepage.h
+++ b/src/gui/widgets/emotepage.h
@@ -41,7 +41,7 @@ class EmotePage final : public gcn::Widget,
~EmotePage();
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
void mousePressed(gcn::MouseEvent &mouseEvent) override final;
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index 8d83ffeae..bdb5c3163 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -99,7 +99,7 @@ void EmoteShortcutContainer::setWidget2(const Widget2 *const widget)
mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
}
-void EmoteShortcutContainer::draw(gcn::Graphics *graphics)
+void EmoteShortcutContainer::draw(Graphics *graphics)
{
if (!emoteShortcut)
return;
diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h
index 2c99aaf87..62999207e 100644
--- a/src/gui/widgets/emoteshortcutcontainer.h
+++ b/src/gui/widgets/emoteshortcutcontainer.h
@@ -53,7 +53,7 @@ class EmoteShortcutContainer final : public ShortcutContainer
/**
* Draws the items.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Handles mouse when dragged.
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index 6aaf85bbe..66065295c 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -23,9 +23,10 @@
#include "gui/widgets/extendedlistmodel.h"
#include "gui/base/font.hpp"
-#include "gui/base/graphics.hpp"
#include "gui/base/listmodel.hpp"
+#include "render/graphics.h"
+
#include "debug.h"
ExtendedListBox::ExtendedListBox(const Widget2 *const widget,
@@ -47,7 +48,7 @@ ExtendedListBox::~ExtendedListBox()
{
}
-void ExtendedListBox::draw(gcn::Graphics *graphics)
+void ExtendedListBox::draw(Graphics *graphics)
{
if (!mListModel)
return;
diff --git a/src/gui/widgets/extendedlistbox.h b/src/gui/widgets/extendedlistbox.h
index 30e7a32fb..9fa14fa9e 100644
--- a/src/gui/widgets/extendedlistbox.h
+++ b/src/gui/widgets/extendedlistbox.h
@@ -59,7 +59,7 @@ class ExtendedListBox final : public ListBox
/**
* Draws the list box.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
void adjustSize() override;
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 9630f5c17..6928b11d8 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -30,9 +30,10 @@
#include "utils/dtor.h"
#include "gui/base/actionlistener.hpp"
-#include "gui/base/graphics.hpp"
#include "gui/base/key.hpp"
+#include "render/graphics.h"
+
#include "debug.h"
float GuiTable::mAlpha = 1.0;
@@ -293,7 +294,7 @@ void GuiTable::installActionListeners()
}
// -- widget ops
-void GuiTable::draw(gcn::Graphics* graphics)
+void GuiTable::draw(Graphics* graphics)
{
if (!mModel || !getRowHeight())
return;
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index e91482078..2154d0889 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -113,7 +113,7 @@ public:
}
// Inherited from Widget
- void draw(gcn::Graphics* graphics) override final;
+ void draw(Graphics* graphics) override final;
gcn::Widget *getWidgetAt(int x, int y) override final A_WARN_UNUSED;
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 4fb511c85..e9b7cd525 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -67,7 +67,7 @@ void Icon::setImage(Image *const image)
}
}
-void Icon::draw(gcn::Graphics *g)
+void Icon::draw(Graphics *g)
{
BLOCK_START("Icon::draw")
if (mImage)
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index 98cb83b61..a39cec517 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -68,7 +68,7 @@ class Icon final : public gcn::Widget,
/**
* Draws the Icon.
*/
- void draw(gcn::Graphics *g) override final;
+ void draw(Graphics *g) override final;
private:
Image *mImage;
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 0361c54e7..eedbc1bd0 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -245,7 +245,7 @@ void ItemContainer::logic()
BLOCK_END("ItemContainer::logic")
}
-void ItemContainer::draw(gcn::Graphics *graphics)
+void ItemContainer::draw(Graphics *graphics)
{
if (!mInventory || !mShowMatrix)
return;
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index c7ca851d9..cfacb05c6 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -85,7 +85,7 @@ class ItemContainer final : public gcn::Widget,
/**
* Draws the items.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
// KeyListener
void keyPressed(gcn::KeyEvent &event) override final;
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 1334afae7..78b9c0e62 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -112,7 +112,7 @@ void ItemShortcutContainer::setWidget2(const Widget2 *const widget)
mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
}
-void ItemShortcutContainer::draw(gcn::Graphics *graphics)
+void ItemShortcutContainer::draw(Graphics *graphics)
{
BLOCK_START("ItemShortcutContainer::draw")
const ItemShortcut *const selShortcut = itemShortcut[mNumber];
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index f9ec24589..c2dbe93a3 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -51,7 +51,7 @@ class ItemShortcutContainer final : public ShortcutContainer
/**
* Draws the items.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Handles mouse when dragged.
diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp
index 767830f5d..89ba17cd6 100644
--- a/src/gui/widgets/label.cpp
+++ b/src/gui/widgets/label.cpp
@@ -76,7 +76,7 @@ void Label::init()
mPadding = 0;
}
-void Label::draw(gcn::Graphics* graphics)
+void Label::draw(Graphics* graphics)
{
BLOCK_START("Label::draw")
int textX;
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index 2fc2393fb..0b96b87e4 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -59,7 +59,7 @@ class Label final : public gcn::Label, public Widget2
/**
* Draws the label.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
void adjustSize();
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 767067801..0a7956476 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -31,9 +31,10 @@
#include "gui/base/focushandler.hpp"
#include "gui/base/font.hpp"
-#include "gui/base/graphics.hpp"
#include "gui/base/listmodel.hpp"
+#include "render/graphics.h"
+
#include "debug.h"
float ListBox::mAlpha = 1.0;
@@ -98,7 +99,7 @@ void ListBox::updateAlpha()
mAlpha = alpha;
}
-void ListBox::draw(gcn::Graphics *graphics)
+void ListBox::draw(Graphics *graphics)
{
if (!mListModel)
return;
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index 784193fdf..459aea2e3 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -58,7 +58,7 @@ class ListBox : public gcn::ListBox,
/**
* Draws the list box.
*/
- void draw(gcn::Graphics *graphics) override;
+ void draw(Graphics *graphics) override;
/**
* Update the alpha value to the graphic components.
diff --git a/src/gui/widgets/passwordfield.cpp b/src/gui/widgets/passwordfield.cpp
index b2ee6ccad..1b562b7f0 100644
--- a/src/gui/widgets/passwordfield.cpp
+++ b/src/gui/widgets/passwordfield.cpp
@@ -31,7 +31,7 @@ PasswordField::PasswordField(const Widget2 *const widget,
{
}
-void PasswordField::draw(gcn::Graphics *graphics)
+void PasswordField::draw(Graphics *graphics)
{
BLOCK_START("PasswordField::draw")
// std::string uses cow, thus cheap copy
diff --git a/src/gui/widgets/passwordfield.h b/src/gui/widgets/passwordfield.h
index 322d71b8b..f72350763 100644
--- a/src/gui/widgets/passwordfield.h
+++ b/src/gui/widgets/passwordfield.h
@@ -44,7 +44,7 @@ class PasswordField final : public TextField
/**
* Draws the password field.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
protected:
int mPasswordChar;
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index 6fda932bf..260f80099 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -107,7 +107,7 @@ void PlayerBox::init(std::string name, std::string selectedName)
}
}
-void PlayerBox::draw(gcn::Graphics *graphics)
+void PlayerBox::draw(Graphics *graphics)
{
BLOCK_START("PlayerBox::draw")
if (mBeing)
@@ -130,7 +130,7 @@ void PlayerBox::draw(gcn::Graphics *graphics)
BLOCK_END("PlayerBox::draw")
}
-void PlayerBox::drawFrame(gcn::Graphics *graphics)
+void PlayerBox::drawFrame(Graphics *graphics)
{
BLOCK_START("PlayerBox::drawFrame")
if (mDrawBackground)
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index b78c8c3f1..9671715b0 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -71,12 +71,12 @@ class PlayerBox final : public Widget2,
/**
* Draws the scroll area.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Draws the background and border of the scroll area.
*/
- void drawFrame(gcn::Graphics *graphics) override final;
+ void drawFrame(Graphics *graphics) override final;
Being *getBeing() A_WARN_UNUSED
{ return mBeing; }
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index c0de328e7..56d5d0d0c 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -94,7 +94,7 @@ void Popup::setWindowContainer(WindowContainer *const wc)
windowContainer = wc;
}
-void Popup::draw(gcn::Graphics *graphics)
+void Popup::draw(Graphics *graphics)
{
BLOCK_START("Popup::draw")
Graphics *const g = static_cast<Graphics*>(graphics);
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h
index 7e7001891..f0fd1b932 100644
--- a/src/gui/widgets/popup.h
+++ b/src/gui/widgets/popup.h
@@ -75,7 +75,7 @@ class Popup : public Container, public gcn::MouseListener,
/**
* Draws the popup.
*/
- void draw(gcn::Graphics *graphics) override;
+ void draw(Graphics *graphics) override;
/**
* Sets the size of this popup.
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 61ecc9080..28c87f4ec 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -146,7 +146,7 @@ void ProgressBar::updateAlpha()
mAlpha = alpha;
}
-void ProgressBar::draw(gcn::Graphics *graphics)
+void ProgressBar::draw(Graphics *graphics)
{
BLOCK_START("ProgressBar::draw")
updateAlpha();
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index ca32fc165..022d86ab3 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -70,7 +70,7 @@ class ProgressBar final : public gcn::Widget,
/**
* Draws the progress bar.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Sets the current progress.
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp
index d89ff7f2a..358518132 100644
--- a/src/gui/widgets/progressindicator.cpp
+++ b/src/gui/widgets/progressindicator.cpp
@@ -65,7 +65,7 @@ void ProgressIndicator::logic()
BLOCK_END("ProgressIndicator::logic")
}
-void ProgressIndicator::draw(gcn::Graphics *graphics)
+void ProgressIndicator::draw(Graphics *graphics)
{
BLOCK_START("ProgressIndicator::draw")
if (mIndicator)
diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h
index fc9ab5b5f..8dd33bf4d 100644
--- a/src/gui/widgets/progressindicator.h
+++ b/src/gui/widgets/progressindicator.h
@@ -46,7 +46,7 @@ class ProgressIndicator final : public gcn::Widget,
void logic() override final;
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
private:
SimpleAnimation *mIndicator;
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index a81afa037..4a47a4b4e 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -110,7 +110,7 @@ void RadioButton::updateAlpha()
}
}
-void RadioButton::drawBox(gcn::Graphics* graphics)
+void RadioButton::drawBox(Graphics* graphics)
{
if (!mSkin)
return;
@@ -154,7 +154,7 @@ void RadioButton::drawBox(gcn::Graphics* graphics)
}
}
-void RadioButton::draw(gcn::Graphics* graphics)
+void RadioButton::draw(Graphics* graphics)
{
BLOCK_START("RadioButton::draw")
drawBox(graphics);
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index dca2d1167..ff6f5aafd 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -56,13 +56,13 @@ class RadioButton final : public gcn::RadioButton,
/**
* Draws the radiobutton, not the caption.
*/
- void drawBox(gcn::Graphics* graphics) override final;
+ void drawBox(Graphics* graphics) override final;
/**
* Implementation of the draw methods.
* Thus, avoiding the rhomb around the radio button.
*/
- void draw(gcn::Graphics* graphics) override final;
+ void draw(Graphics* graphics) override final;
/**
* Called when the mouse enteres the widget area.
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index a260142a1..89e75f4d7 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -248,7 +248,7 @@ void ScrollArea::updateAlpha()
}
}
-void ScrollArea::draw(gcn::Graphics *graphics)
+void ScrollArea::draw(Graphics *graphics)
{
BLOCK_START("ScrollArea::draw")
if (mVBarVisible || mHBarVisible)
@@ -329,7 +329,7 @@ void ScrollArea::draw(gcn::Graphics *graphics)
BLOCK_END("ScrollArea::draw")
}
-void ScrollArea::updateCalcFlag(gcn::Graphics *const graphics)
+void ScrollArea::updateCalcFlag(Graphics *const graphics)
{
if (!mRedraw)
{
@@ -356,7 +356,7 @@ void ScrollArea::updateCalcFlag(gcn::Graphics *const graphics)
}
}
-void ScrollArea::drawFrame(gcn::Graphics *graphics)
+void ScrollArea::drawFrame(Graphics *graphics)
{
BLOCK_START("ScrollArea::drawFrame")
if (mOpaque)
@@ -392,7 +392,7 @@ void ScrollArea::setOpaque(bool opaque)
setFrameSize(mOpaque ? 2 : 0);
}
-void ScrollArea::drawButton(gcn::Graphics *const graphics,
+void ScrollArea::drawButton(Graphics *const graphics,
const BUTTON_DIR dir)
{
int state = 0;
@@ -430,7 +430,7 @@ void ScrollArea::drawButton(gcn::Graphics *const graphics,
}
}
-void ScrollArea::calcButton(gcn::Graphics *const graphics,
+void ScrollArea::calcButton(Graphics *const graphics,
const BUTTON_DIR dir)
{
int state = 0;
@@ -468,7 +468,7 @@ void ScrollArea::calcButton(gcn::Graphics *const graphics,
}
}
-void ScrollArea::drawVBar(gcn::Graphics *const graphics)
+void ScrollArea::drawVBar(Graphics *const graphics)
{
const gcn::Rectangle &dim = getVerticalBarDimension();
Graphics *const g = static_cast<Graphics*>(graphics);
@@ -491,7 +491,7 @@ void ScrollArea::drawVBar(gcn::Graphics *const graphics)
}
}
-void ScrollArea::calcVBar(gcn::Graphics *const graphics)
+void ScrollArea::calcVBar(Graphics *const graphics)
{
const gcn::Rectangle &dim = getVerticalBarDimension();
Graphics *const g = static_cast<Graphics *const>(graphics);
@@ -514,7 +514,7 @@ void ScrollArea::calcVBar(gcn::Graphics *const graphics)
}
}
-void ScrollArea::drawHBar(gcn::Graphics *const graphics)
+void ScrollArea::drawHBar(Graphics *const graphics)
{
const gcn::Rectangle &dim = getHorizontalBarDimension();
Graphics *const g = static_cast<Graphics*>(graphics);
@@ -539,7 +539,7 @@ void ScrollArea::drawHBar(gcn::Graphics *const graphics)
}
}
-void ScrollArea::calcHBar(gcn::Graphics *const graphics)
+void ScrollArea::calcHBar(Graphics *const graphics)
{
const gcn::Rectangle &dim = getHorizontalBarDimension();
Graphics *const g = static_cast<Graphics*>(graphics);
@@ -564,7 +564,7 @@ void ScrollArea::calcHBar(gcn::Graphics *const graphics)
}
}
-void ScrollArea::drawVMarker(gcn::Graphics *const graphics)
+void ScrollArea::drawVMarker(Graphics *const graphics)
{
const gcn::Rectangle &dim = getVerticalMarkerDimension();
@@ -580,7 +580,7 @@ void ScrollArea::drawVMarker(gcn::Graphics *const graphics)
}
}
-void ScrollArea::calcVMarker(gcn::Graphics *const graphics)
+void ScrollArea::calcVMarker(Graphics *const graphics)
{
const gcn::Rectangle &dim = getVerticalMarkerDimension();
@@ -596,7 +596,7 @@ void ScrollArea::calcVMarker(gcn::Graphics *const graphics)
}
}
-void ScrollArea::drawHMarker(gcn::Graphics *const graphics)
+void ScrollArea::drawHMarker(Graphics *const graphics)
{
const gcn::Rectangle dim = getHorizontalMarkerDimension();
@@ -612,7 +612,7 @@ void ScrollArea::drawHMarker(gcn::Graphics *const graphics)
}
}
-void ScrollArea::calcHMarker(gcn::Graphics *const graphics)
+void ScrollArea::calcHMarker(Graphics *const graphics)
{
const gcn::Rectangle dim = getHorizontalMarkerDimension();
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 58bd73107..fe60399df 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -84,12 +84,12 @@ class ScrollArea final : public gcn::ScrollArea,
/**
* Draws the scroll area.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Draws the background and border of the scroll area.
*/
- void drawFrame(gcn::Graphics *graphics) override final;
+ void drawFrame(Graphics *graphics) override final;
/**
* Sets whether the widget should draw its background or not.
@@ -158,19 +158,19 @@ class ScrollArea final : public gcn::ScrollArea,
*/
void init(std::string skinName);
- void drawButton(gcn::Graphics *const graphics, const BUTTON_DIR dir);
- void calcButton(gcn::Graphics *const graphics, const BUTTON_DIR dir);
- void drawVBar(gcn::Graphics *const graphics) override final;
- void drawHBar(gcn::Graphics *const graphics) override final;
- void drawVMarker(gcn::Graphics *const graphics) override final;
- void drawHMarker(gcn::Graphics *const graphics) override final;
+ void drawButton(Graphics *const graphics, const BUTTON_DIR dir);
+ void calcButton(Graphics *const graphics, const BUTTON_DIR dir);
+ void drawVBar(Graphics *const graphics) override final;
+ void drawHBar(Graphics *const graphics) override final;
+ void drawVMarker(Graphics *const graphics) override final;
+ void drawHMarker(Graphics *const graphics) override final;
- void calcVBar(gcn::Graphics *const graphics);
- void calcHBar(gcn::Graphics *const graphics);
- void calcVMarker(gcn::Graphics *const graphics);
- void calcHMarker(gcn::Graphics *const graphics);
+ void calcVBar(Graphics *const graphics);
+ void calcHBar(Graphics *const graphics);
+ void calcVMarker(Graphics *const graphics);
+ void calcHMarker(Graphics *const graphics);
- void updateCalcFlag(gcn::Graphics *const graphics);
+ void updateCalcFlag(Graphics *const graphics);
static int instances;
static float mAlpha;
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index 4a7fda039..644023c43 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -82,7 +82,7 @@ void ShopListBox::setPlayersMoney(const int money)
mPlayerMoney = money;
}
-void ShopListBox::draw(gcn::Graphics *gcnGraphics)
+void ShopListBox::draw(Graphics *gcnGraphics)
{
BLOCK_START("ShopListBox::draw")
if (!mListModel || !mShopItems)
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index 095d187eb..509af8393 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -56,7 +56,7 @@ class ShopListBox final : public ListBox
/**
* Draws the list box.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* gives information about the current player's money
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h
index 88e27320a..4d4ff2389 100644
--- a/src/gui/widgets/shortcutcontainer.h
+++ b/src/gui/widgets/shortcutcontainer.h
@@ -53,7 +53,7 @@ class ShortcutContainer : public gcn::Widget,
/**
* Draws the shortcuts
*/
- virtual void draw(gcn::Graphics *graphics) override = 0;
+ virtual void draw(Graphics *graphics) override = 0;
/**
* Invoked when a widget changes its size. This is used to determine
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 750b58528..1427bb6eb 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -118,7 +118,7 @@ void Slider::updateAlpha()
}
}
-void Slider::draw(gcn::Graphics *graphics)
+void Slider::draw(Graphics *graphics)
{
BLOCK_START("Slider::draw")
if (!buttons[0].grid[HSTART] || !buttons[1].grid[HSTART]
diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h
index d5d4a30fe..c59e0c47f 100644
--- a/src/gui/widgets/slider.h
+++ b/src/gui/widgets/slider.h
@@ -65,7 +65,7 @@ class Slider final : public gcn::Slider,
/**
* Draws the slider.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Called when the mouse enteres the widget area.
diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp
index 4416a00b7..b75f65820 100644
--- a/src/gui/widgets/sliderlist.cpp
+++ b/src/gui/widgets/sliderlist.cpp
@@ -103,7 +103,7 @@ void SliderList::resize()
updateLabel();
}
-void SliderList::draw(gcn::Graphics *graphics)
+void SliderList::draw(Graphics *graphics)
{
BLOCK_START("SliderList::draw")
const int width = mDimension.width;
diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h
index 016a60290..e0f63517b 100644
--- a/src/gui/widgets/sliderlist.h
+++ b/src/gui/widgets/sliderlist.h
@@ -55,7 +55,7 @@ class SliderList final : public Container,
void resize();
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
void action(const gcn::ActionEvent &event) override final;
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index e59b9fbdb..7c59676b9 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -90,7 +90,7 @@ void SpellShortcutContainer::setWidget2(const Widget2 *const widget)
mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE);
}
-void SpellShortcutContainer::draw(gcn::Graphics *graphics)
+void SpellShortcutContainer::draw(Graphics *graphics)
{
if (!spellShortcut)
return;
diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h
index 37e7b5660..3115e47fe 100644
--- a/src/gui/widgets/spellshortcutcontainer.h
+++ b/src/gui/widgets/spellshortcutcontainer.h
@@ -50,7 +50,7 @@ class SpellShortcutContainer final : public ShortcutContainer
/**
* Draws the items.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Handles mouse when dragged.
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 8cb8fd78a..2a212ce75 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -139,7 +139,7 @@ Tab *TabbedArea::getTab(const std::string &name) const
return nullptr;
}
-void TabbedArea::draw(gcn::Graphics *graphics)
+void TabbedArea::draw(Graphics *graphics)
{
BLOCK_START("TabbedArea::draw")
if (mTabs.empty())
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 7a023903f..dede91767 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -60,7 +60,7 @@ class TabbedArea final : public Widget2,
/**
* Draw the tabbed area.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Return how many tabs have been created.
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 4f1703d31..d0561cadf 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -153,7 +153,7 @@ void Tab::updateAlpha()
}
}
-void Tab::draw(gcn::Graphics *graphics)
+void Tab::draw(Graphics *graphics)
{
BLOCK_START("Tab::draw")
int mode = TAB_STANDARD;
diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h
index fa9846ab4..66f7521d9 100644
--- a/src/gui/widgets/tabs/tab.h
+++ b/src/gui/widgets/tabs/tab.h
@@ -68,7 +68,7 @@ class Tab : public gcn::BasicContainer,
/**
* Draw the tabbed area.
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Set the normal color for the tab's text.
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 3f56ecfcf..8aaca4211 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -350,7 +350,7 @@ void TextBox::keyPressed(gcn::KeyEvent& keyEvent)
keyEvent.consume();
}
-void TextBox::draw(gcn::Graphics* graphics)
+void TextBox::draw(Graphics* graphics)
{
BLOCK_START("TextBox::draw")
if (mOpaque)
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 797707716..d8841cfeb 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -62,7 +62,7 @@ class TextBox final : public gcn::TextBox,
void keyPressed(gcn::KeyEvent& keyEvent) override final;
- void draw(gcn::Graphics* graphics) override final;
+ void draw(Graphics* graphics) override final;
void setForegroundColor(const gcn::Color &color);
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index b655de830..b1d188f22 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -137,7 +137,7 @@ void TextField::updateAlpha()
}
}
-void TextField::draw(gcn::Graphics *graphics)
+void TextField::draw(Graphics *graphics)
{
BLOCK_START("TextField::draw")
updateAlpha();
@@ -155,7 +155,7 @@ void TextField::draw(gcn::Graphics *graphics)
BLOCK_END("TextField::draw")
}
-void TextField::drawFrame(gcn::Graphics *graphics)
+void TextField::drawFrame(Graphics *graphics)
{
BLOCK_START("TextField::drawFrame")
const int bs = 2 * mFrameSize;
@@ -661,12 +661,14 @@ void TextField::handleCopy() const
sendBuffer(text);
}
-void TextField::drawCaret(gcn::Graphics* graphics, int x)
+void TextField::drawCaret(Graphics* graphics, int x)
{
- const gcn::Rectangle &clipArea = graphics->getCurrentClipArea();
+ const gcn::Rectangle *const clipArea = graphics->getCurrentClipArea();
+ if (!clipArea)
+ return;
graphics->setColor(*mCaretColor);
- graphics->drawLine(x + mPadding, clipArea.height - mPadding,
+ graphics->drawLine(x + mPadding, clipArea->height - mPadding,
x + mPadding, mPadding);
}
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index d8ab2c830..d3d1ff0eb 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -60,7 +60,7 @@ class TextField : public gcn::TextField,
/**
* Draws the text field.
*/
- virtual void draw(gcn::Graphics *graphics) override;
+ virtual void draw(Graphics *graphics) override;
/**
* Update the alpha value to the graphic components.
@@ -70,7 +70,7 @@ class TextField : public gcn::TextField,
/**
* Draws the background and border.
*/
- void drawFrame(gcn::Graphics *graphics) override final;
+ void drawFrame(Graphics *graphics) override final;
/**
* Determine whether the field should be numeric or not
@@ -142,7 +142,7 @@ class TextField : public gcn::TextField,
void caretDeleteWord();
protected:
- void drawCaret(gcn::Graphics* graphics, int x) override final;
+ void drawCaret(Graphics* graphics, int x) override final;
void fixScroll();
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 8d473dd46..5cfb2abb5 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -79,7 +79,7 @@ TextPreview::~TextPreview()
}
}
-void TextPreview::draw(gcn::Graphics* graphics)
+void TextPreview::draw(Graphics* graphics)
{
BLOCK_START("TextPreview::draw")
if (client->getGuiAlpha() != mAlpha)
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index bfb361a9b..f529e470c 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -102,7 +102,7 @@ class TextPreview final : public gcn::Widget,
*
* @param graphics graphics to draw into
*/
- void draw(gcn::Graphics *graphics) override final;
+ void draw(Graphics *graphics) override final;
/**
* Set opacity for this widget (whether or not to show the background
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index c78582a91..26ca0a29f 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -74,7 +74,7 @@ Window::Window(const std::string &caption, const bool modal,
mVertexes(new ImageCollection),
mCaptionOffsetX(7),
mCaptionOffsetY(5),
- mCaptionAlign(gcn::Graphics::LEFT),
+ mCaptionAlign(Graphics::LEFT),
mTitlePadding(4),
mGripPadding(2),
mResizeHandles(-1),
@@ -123,12 +123,12 @@ Window::Window(const std::string &caption, const bool modal,
mCaptionOffsetY = getOption("captionoffsety");
if (!mCaptionOffsetY)
mCaptionOffsetY = 5;
- mCaptionAlign = static_cast<gcn::Graphics::Alignment>(
+ mCaptionAlign = static_cast<Graphics::Alignment>(
getOption("captionalign"));
- if (mCaptionAlign < gcn::Graphics::LEFT
- || mCaptionAlign > gcn::Graphics::RIGHT)
+ if (mCaptionAlign < Graphics::LEFT
+ || mCaptionAlign > Graphics::RIGHT)
{
- mCaptionAlign = gcn::Graphics::LEFT;
+ mCaptionAlign = Graphics::LEFT;
}
setTitleBarHeight(getOption("titlebarHeight"));
if (!mTitleBarHeight)
@@ -203,7 +203,7 @@ void Window::setWindowContainer(WindowContainer *const wc)
windowContainer = wc;
}
-void Window::draw(gcn::Graphics *graphics)
+void Window::draw(Graphics *graphics)
{
if (!mSkin)
return;
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 29fd589a5..68ce1a293 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -80,7 +80,7 @@ class Window : public gcn::Window,
/**
* Draws the window.
*/
- void draw(gcn::Graphics *graphics) override;
+ void draw(Graphics *graphics) override;
/**
* Sets the size of this window.
@@ -501,7 +501,7 @@ class Window : public gcn::Window,
ImageCollection *mVertexes;
int mCaptionOffsetX;
int mCaptionOffsetY;
- gcn::Graphics::Alignment mCaptionAlign;
+ Graphics::Alignment mCaptionAlign;
int mTitlePadding;
int mGripPadding;
int mResizeHandles;
diff --git a/src/gui/widgets/windowcontainer.cpp b/src/gui/widgets/windowcontainer.cpp
index d23f29bad..5adde3cae 100644
--- a/src/gui/widgets/windowcontainer.cpp
+++ b/src/gui/widgets/windowcontainer.cpp
@@ -79,7 +79,7 @@ void WindowContainer::moveWidgetAfter(gcn::Widget *const after,
}
#ifdef USE_PROFILER
-void WindowContainer::draw(gcn::Graphics* graphics)
+void WindowContainer::draw(Graphics* graphics)
{
BLOCK_START("WindowContainer::draw")
Container::draw(graphics);
diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h
index 2ee4ea37d..d940a4e91 100644
--- a/src/gui/widgets/windowcontainer.h
+++ b/src/gui/widgets/windowcontainer.h
@@ -57,7 +57,7 @@ class WindowContainer : public Container
gcn::Widget *const widget);
#ifdef USE_PROFILER
- void draw(gcn::Graphics* graphics);
+ void draw(Graphics* graphics);
#endif
private: