summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/botcheckerwindow.cpp2
-rw-r--r--src/gui/windows/buydialog.cpp2
-rw-r--r--src/gui/windows/didyouknowwindow.cpp2
-rw-r--r--src/gui/windows/helpwindow.cpp3
-rw-r--r--src/gui/windows/inventorywindow.cpp4
-rw-r--r--src/gui/windows/npcdialog.cpp6
-rw-r--r--src/gui/windows/npcpostdialog.cpp2
-rw-r--r--src/gui/windows/questswindow.cpp4
-rw-r--r--src/gui/windows/selldialog.cpp2
-rw-r--r--src/gui/windows/serverdialog.cpp2
-rw-r--r--src/gui/windows/shopwindow.cpp4
-rw-r--r--src/gui/windows/shortcutwindow.cpp7
-rw-r--r--src/gui/windows/skilldialog.cpp8
-rw-r--r--src/gui/windows/socialwindow.cpp31
-rw-r--r--src/gui/windows/statuswindow.cpp4
-rw-r--r--src/gui/windows/tradewindow.cpp5
-rw-r--r--src/gui/windows/updaterwindow.cpp3
-rw-r--r--src/gui/windows/whoisonline.cpp2
-rw-r--r--src/gui/windows/worldselectdialog.cpp2
19 files changed, 53 insertions, 42 deletions
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
index e04174962..ade95eba5 100644
--- a/src/gui/windows/botcheckerwindow.cpp
+++ b/src/gui/windows/botcheckerwindow.cpp
@@ -263,7 +263,7 @@ BotCheckerWindow::BotCheckerWindow():
ActionListener(),
mTableModel(new UsersTableModel(this)),
mTable(new GuiTable(this, mTableModel)),
- playersScrollArea(new ScrollArea(mTable, true,
+ playersScrollArea(new ScrollArea(this, mTable, true,
"bochecker_background.xml")),
mPlayerTableTitleModel(new StaticTableModel(1, COLUMNS_NR)),
mPlayerTitleTable(new GuiTable(this, mPlayerTableTitleModel)),
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 4d2acfac9..cd593bf92 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -240,7 +240,7 @@ void BuyDialog::init()
mShopItemList = new ShopListBox(this, mShopItems, mShopItems);
mShopItemList->postInit();
- mScrollArea = new ScrollArea(mShopItemList,
+ mScrollArea = new ScrollArea(this, mShopItemList,
getOptionBool("showbackground"), "buy_background.xml");
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 58e6d9c24..95d657772 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -51,7 +51,7 @@ DidYouKnowWindow::DidYouKnowWindow() :
ActionListener(),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mBrowserBox,
+ mScrollArea(new ScrollArea(this, mBrowserBox,
true, "didyouknow_background.xml")),
// TRANSLATORS: did you know window button
mButtonPrev(new Button(this, _("< Previous"), "prev", this)),
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 0b31a410b..7457c7b1e 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -53,7 +53,8 @@ HelpWindow::HelpWindow() :
mDYKButton(new Button(this, _("Did you know..."), "DYK", this)),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mBrowserBox, true, "help_background.xml")),
+ mScrollArea(new ScrollArea(this, mBrowserBox,
+ true, "help_background.xml")),
mTagFileMap()
{
setMinWidth(300);
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index c95c2c54e..bc66f588c 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -182,8 +182,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
mItems->addSelectionListener(this);
- gcn::ScrollArea *const invenScroll = new ScrollArea(
- mItems, getOptionBool("showbackground"), "inventory_background.xml");
+ gcn::ScrollArea *const invenScroll = new ScrollArea(this, mItems,
+ getOptionBool("showbackground"), "inventory_background.xml");
invenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
const int size = config.getIntValue("fontSize");
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index d1823d5cf..a1b2109fb 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -84,12 +84,12 @@ NpcDialog::NpcDialog(const int npcId) :
mDefaultString(),
mTextBox(new BrowserBox(this, BrowserBox::AUTO_WRAP, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mTextBox,
+ mScrollArea(new ScrollArea(this, mTextBox,
getOptionBool("showtextbackground"), "npc_textbackground.xml")),
mText(),
mNewText(),
mItemList(new ExtendedListBox(this, this, "extendedlistbox.xml")),
- mListScrollArea(new ScrollArea(mItemList,
+ mListScrollArea(new ScrollArea(this, mItemList,
getOptionBool("showlistbackground"), "npc_listbackground.xml")),
mItems(),
mImages(),
@@ -111,7 +111,7 @@ NpcDialog::NpcDialog(const int npcId) :
mResetButton(new Button(this, _("Reset"), "reset", this)),
mInventory(new Inventory(Inventory::NPC, 1)),
mItemContainer(new ItemContainer(this, mInventory)),
- mItemScrollArea(new ScrollArea(mItemContainer,
+ mItemScrollArea(new ScrollArea(this, mItemContainer,
getOptionBool("showitemsbackground"), "npc_listbackground.xml")),
mInputState(NPC_INPUT_NONE),
mActionState(NPC_ACTION_WAIT),
diff --git a/src/gui/windows/npcpostdialog.cpp b/src/gui/windows/npcpostdialog.cpp
index 587f94ab2..23c21da0c 100644
--- a/src/gui/windows/npcpostdialog.cpp
+++ b/src/gui/windows/npcpostdialog.cpp
@@ -74,7 +74,7 @@ void NpcPostDialog::postInit()
mText->setEditable(true);
// create scroll box for letter text
- ScrollArea *const scrollArea = new ScrollArea(mText);
+ ScrollArea *const scrollArea = new ScrollArea(this, mText);
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
scrollArea->setDimension(gcn::Rectangle(
5, mSender->getHeight() + 5,
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 2e8c5dcc8..1a8749899 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -126,11 +126,11 @@ QuestsWindow::QuestsWindow() :
mQuestsModel(new QuestsModel),
mQuestsListBox(new ExtendedListBox(this,
mQuestsModel, "extendedlistbox.xml")),
- mQuestScrollArea(new ScrollArea(mQuestsListBox,
+ mQuestScrollArea(new ScrollArea(this, mQuestsListBox,
getOptionBool("showlistbackground"), "quests_list_background.xml")),
mItemLinkHandler(new ItemLinkHandler),
mText(new BrowserBox(this, BrowserBox::AUTO_WRAP, true, "browserbox.xml")),
- mTextScrollArea(new ScrollArea(mText,
+ mTextScrollArea(new ScrollArea(this, mText,
getOptionBool("showtextbackground"), "quests_text_background.xml")),
// TRANSLATORS: quests window button
mCloseButton(new Button(this, _("Close"), "close", this)),
diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp
index b79d18dcf..dc932ca69 100644
--- a/src/gui/windows/selldialog.cpp
+++ b/src/gui/windows/selldialog.cpp
@@ -86,7 +86,7 @@ void SellDialog::init()
mShopItemList = new ShopListBox(this, mShopItems, mShopItems);
mShopItemList->postInit();
mShopItemList->setProtectItems(true);
- mScrollArea = new ScrollArea(mShopItemList,
+ mScrollArea = new ScrollArea(this, mShopItemList,
getOptionBool("showbackground"), "sell_background.xml");
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index fb2f5258b..6823c2649 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -292,7 +292,7 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
mServersList->addMouseListener(this);
- ScrollArea *const usedScroll = new ScrollArea(mServersList,
+ ScrollArea *const usedScroll = new ScrollArea(this, mServersList,
getOptionBool("showbackground"), "server_background.xml");
usedScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 9e55af797..706438f61 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -79,9 +79,9 @@ ShopWindow::ShopWindow():
mSellShopItems(new ShopItems),
mBuyShopItemList(new ShopListBox(this, mBuyShopItems, mBuyShopItems)),
mSellShopItemList(new ShopListBox(this, mSellShopItems, mSellShopItems)),
- mBuyScrollArea(new ScrollArea(mBuyShopItemList,
+ mBuyScrollArea(new ScrollArea(this, mBuyShopItemList,
getOptionBool("showbuybackground"), "shop_buy_background.xml")),
- mSellScrollArea(new ScrollArea(mSellShopItemList,
+ mSellScrollArea(new ScrollArea(this, mSellShopItemList,
getOptionBool("showsellbackground"), "shop_sell_background.xml")),
// TRANSLATORS: shop window label
mBuyLabel(new Label(this, _("Buy items"))),
diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp
index 50bc6fcd1..5b3c03e90 100644
--- a/src/gui/windows/shortcutwindow.cpp
+++ b/src/gui/windows/shortcutwindow.cpp
@@ -40,7 +40,8 @@ class ShortcutTab final : public Tab
{
public:
ShortcutTab(const Widget2 *const widget,
- std::string name, ShortcutContainer *const content) :
+ std::string name,
+ ShortcutContainer *const content) :
Tab(widget),
mContent(content)
{
@@ -58,7 +59,7 @@ ShortcutWindow::ShortcutWindow(const std::string &restrict title,
int width, int height) :
Window("Window", false, nullptr, skinFile),
mItems(content),
- mScrollArea(new ScrollArea(mItems, false)),
+ mScrollArea(new ScrollArea(this, mItems, false)),
mTabs(nullptr),
mPages()
{
@@ -160,7 +161,7 @@ ShortcutWindow::~ShortcutWindow()
void ShortcutWindow::addTab(const std::string &name,
ShortcutContainer *const content)
{
- ScrollArea *const scroll = new ScrollArea(content, false);
+ ScrollArea *const scroll = new ScrollArea(this, content, false);
scroll->setPosition(SCROLL_PADDING, SCROLL_PADDING);
scroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
content->setWidget2(this);
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 413f73226..9cc952ec6 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -59,7 +59,8 @@
class SkillListBox final : public ListBox
{
public:
- SkillListBox(const Widget2 *const widget, SkillModel *const model) :
+ SkillListBox(const Widget2 *const widget,
+ SkillModel *const model) :
ListBox(widget, model, "skilllistbox.xml"),
mModel(model),
mPopup(new TextPopup),
@@ -241,7 +242,8 @@ class SkillTab final : public Tab
{
public:
SkillTab(const Widget2 *const widget,
- const std::string &name, SkillListBox *const listBox) :
+ const std::string &name,
+ SkillListBox *const listBox) :
Tab(widget),
mListBox(listBox)
{
@@ -541,7 +543,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
SkillListBox *const listbox = new SkillListBox(this, model);
listbox->setActionEventId("sel");
listbox->addActionListener(this);
- ScrollArea *const scroll = new ScrollArea(listbox, false);
+ ScrollArea *const scroll = new ScrollArea(this, listbox, false);
scroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
scroll->setVerticalScrollPolicy(ScrollArea::SHOW_ALWAYS);
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 704bf0ca6..52ddc9439 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -173,7 +173,8 @@ class SocialGuildTab final : public SocialTab, public ActionListener
{
public:
SocialGuildTab(const Widget2 *const widget,
- Guild *const guild, const bool showBackground) :
+ Guild *const guild,
+ const bool showBackground) :
SocialTab(widget),
ActionListener(),
mGuild(guild)
@@ -191,7 +192,7 @@ public:
mList = new AvatarListBox(this, guild);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -308,7 +309,8 @@ private:
class SocialGuildTab2 final : public SocialTab, public ActionListener
{
public:
- SocialGuildTab2(const Widget2 *const widget, Guild *const guild,
+ SocialGuildTab2(const Widget2 *const widget,
+ Guild *const guild,
const bool showBackground) :
SocialTab(widget),
ActionListener()
@@ -326,7 +328,7 @@ public:
mList = new AvatarListBox(this, guild);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -376,7 +378,8 @@ class SocialPartyTab final : public SocialTab, public ActionListener
{
public:
SocialPartyTab(const Widget2 *const widget,
- Party *const party, const bool showBackground) :
+ Party *const party,
+ const bool showBackground) :
SocialTab(widget),
ActionListener(),
mParty(party)
@@ -394,7 +397,7 @@ public:
mList = new AvatarListBox(this, party);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -538,13 +541,14 @@ class SocialPlayersTab final : public SocialTab
{
public:
SocialPlayersTab(const Widget2 *const widget,
- std::string name, const bool showBackground) :
+ std::string name,
+ const bool showBackground) :
SocialTab(widget),
mBeings(new BeingsListModal)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -710,7 +714,7 @@ public:
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -1039,7 +1043,7 @@ public:
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -1086,7 +1090,7 @@ public:
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -1126,13 +1130,14 @@ class SocialFriendsTab final : public SocialTab
{
public:
SocialFriendsTab(const Widget2 *const widget,
- std::string name, const bool showBackground) :
+ std::string name,
+ const bool showBackground) :
SocialTab(widget),
mBeings(new BeingsListModal)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 1279961e6..05172c9b3 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -159,9 +159,9 @@ StatusWindow::StatusWindow() :
mJobLabel(nullptr),
mJobBar(nullptr),
mAttrCont(new VertContainer(this, 32)),
- mAttrScroll(new ScrollArea(mAttrCont, false)),
+ mAttrScroll(new ScrollArea(this, mAttrCont, false)),
mDAttrCont(new VertContainer(this, 32)),
- mDAttrScroll(new ScrollArea(mDAttrCont, false)),
+ mDAttrScroll(new ScrollArea(this, mDAttrCont, false)),
mCharacterPointsLabel(new Label(this, "C")),
mCorrectionPointsLabel(nullptr),
// TRANSLATORS: status window button
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index d94b78c34..25d077d5d 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -110,13 +110,14 @@ TradeWindow::TradeWindow():
mMyItemContainer->addSelectionListener(this);
- ScrollArea *const myScroll = new ScrollArea(mMyItemContainer,
+ ScrollArea *const myScroll = new ScrollArea(this, mMyItemContainer,
true, "trade_background.xml");
myScroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
mPartnerItemContainer->addSelectionListener(this);
- ScrollArea *const partnerScroll = new ScrollArea(mPartnerItemContainer,
+ ScrollArea *const partnerScroll = new ScrollArea(this,
+ mPartnerItemContainer,
true, "trade_background.xml");
partnerScroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 8e31939ff..e72308da7 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -190,7 +190,8 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
"updateprogressbar.xml", "updateprogressbar_fill.xml")),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mBrowserBox, true, "update_background.xml")),
+ mScrollArea(new ScrollArea(this, mBrowserBox,
+ true, "update_background.xml")),
mUpdateServerPath(mUpdateHost)
{
setWindowName("UpdaterWindow");
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 1af21866d..76f12f795 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -87,7 +87,7 @@ WhoIsOnline::WhoIsOnline() :
mCurlError(new char[CURL_ERROR_SIZE]),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"onlinebrowserbox.xml")),
- mScrollArea(new ScrollArea(mBrowserBox, false)),
+ mScrollArea(new ScrollArea(this, mBrowserBox, false)),
mUpdateTimer(0),
mOnlinePlayers(),
mOnlineNicks(),
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index 0d861b85c..3c7602a70 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -93,7 +93,7 @@ WorldSelectDialog::WorldSelectDialog(Worlds worlds):
mChooseWorld(new Button(this, _("Choose World"), "world", this))
{
mWorldList->postInit();
- ScrollArea *const worldsScroll = new ScrollArea(mWorldList,
+ ScrollArea *const worldsScroll = new ScrollArea(this, mWorldList,
getOptionBool("showbackground"), "world_background.xml");
worldsScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);