summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-20 02:53:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-20 13:55:43 +0300
commit4f20c92940b9cbb8e87d0765860a81eb3f7d2733 (patch)
tree94bb2372a80b65e39751ddac3bcfb861beb837af /src/gui
parent015b14f8e60d64da2999da9c753af62ec1ffdf72 (diff)
downloadplus-4f20c92940b9cbb8e87d0765860a81eb3f7d2733.tar.gz
plus-4f20c92940b9cbb8e87d0765860a81eb3f7d2733.tar.bz2
plus-4f20c92940b9cbb8e87d0765860a81eb3f7d2733.tar.xz
plus-4f20c92940b9cbb8e87d0765860a81eb3f7d2733.zip
Add palette inheritance to textbox class.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/confirmdialog.cpp2
-rw-r--r--src/gui/itempopup.cpp6
-rw-r--r--src/gui/npcpostdialog.cpp2
-rw-r--r--src/gui/okdialog.cpp2
-rw-r--r--src/gui/speechbubble.cpp2
-rw-r--r--src/gui/widgets/shoplistbox.cpp2
-rw-r--r--src/gui/widgets/textbox.cpp4
-rw-r--r--src/gui/widgets/textbox.h2
8 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/confirmdialog.cpp b/src/gui/confirmdialog.cpp
index f66d44132..65fdb9fd1 100644
--- a/src/gui/confirmdialog.cpp
+++ b/src/gui/confirmdialog.cpp
@@ -40,7 +40,7 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
Window *const parent):
Window(title, modal, parent, "confirm.xml"),
gcn::ActionListener(),
- mTextBox(new TextBox)
+ mTextBox(new TextBox(this))
{
mTextBox->setEditable(false);
mTextBox->setOpaque(false);
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 2b7ddff9c..bf861f9d5 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -48,9 +48,9 @@
ItemPopup::ItemPopup() :
Popup("ItemPopup", "itempopup.xml"),
mItemName(new Label(this)),
- mItemDesc(new TextBox),
- mItemEffect(new TextBox),
- mItemWeight(new TextBox),
+ mItemDesc(new TextBox(this)),
+ mItemEffect(new TextBox(this)),
+ mItemWeight(new TextBox(this)),
mIcon(new Icon(this, nullptr)),
mLastName(""),
mLastColor(1)
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp
index 6d1064ef6..09d94881f 100644
--- a/src/gui/npcpostdialog.cpp
+++ b/src/gui/npcpostdialog.cpp
@@ -42,7 +42,7 @@ NpcPostDialog::NpcPostDialog(const int npcId):
Window(_("NPC"), false, nullptr, "npcpost.xml"),
gcn::ActionListener(),
mNpcId(npcId),
- mText(new TextBox),
+ mText(new TextBox(this)),
mSender(new TextField(this))
{
setContentSize(400, 180);
diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp
index 680cdfbad..1eda1d8c9 100644
--- a/src/gui/okdialog.cpp
+++ b/src/gui/okdialog.cpp
@@ -41,7 +41,7 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
const int minWidth) :
Window(title, modal, parent, "ok.xml"),
gcn::ActionListener(),
- mTextBox(new TextBox)
+ mTextBox(new TextBox(this))
{
mTextBox->setEditable(false);
mTextBox->setOpaque(false);
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index 453408229..2bd601110 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -36,7 +36,7 @@
SpeechBubble::SpeechBubble() :
Popup("Speech", "speechbubble.xml"),
mCaption(new Label(this)),
- mSpeechBox(new TextBox)
+ mSpeechBox(new TextBox(this))
{
setContentSize(140, 46);
setMinWidth(29);
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index b81e3aced..13a2eb822 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -45,7 +45,7 @@ const int ITEM_ICON_SIZE = 32;
float ShopListBox::mAlpha = 1.0;
ShopListBox::ShopListBox(const Widget2 *const widget,
- gcn::ListModel *const listModel) :
+ gcn::ListModel *const listModel) :
ListBox(widget, listModel),
mPlayerMoney(0),
mShopItems(nullptr),
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 017c0f2a2..4f90a6841 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -33,9 +33,9 @@
#include "debug.h"
-TextBox::TextBox() :
+TextBox::TextBox(const Widget2 *const widget) :
gcn::TextBox(),
- Widget2(),
+ Widget2(widget),
mMinWidth(getWidth())
{
mForegroundColor = getThemeColor(Theme::TEXTBOX);
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 335ef777a..73de248cf 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -43,7 +43,7 @@ class TextBox final : public gcn::TextBox,
/**
* Constructor.
*/
- TextBox();
+ TextBox(const Widget2 *const widget);
A_DELETE_COPY(TextBox)