summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/bankwindow.cpp8
-rw-r--r--src/gui/windows/buydialog.cpp30
-rw-r--r--src/gui/windows/changepassworddialog.cpp14
-rw-r--r--src/gui/windows/charselectdialog.cpp18
-rw-r--r--src/gui/windows/connectiondialog.cpp6
-rw-r--r--src/gui/windows/didyouknowwindow.cpp8
-rw-r--r--src/gui/windows/editserverdialog.cpp36
-rw-r--r--src/gui/windows/helpwindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp38
-rw-r--r--src/gui/windows/itemamountwindow.cpp32
-rw-r--r--src/gui/windows/killstats.cpp36
-rw-r--r--src/gui/windows/logindialog.cpp30
-rw-r--r--src/gui/windows/maileditwindow.cpp26
-rw-r--r--src/gui/windows/mailviewwindow.cpp28
-rw-r--r--src/gui/windows/mailwindow.cpp12
-rw-r--r--src/gui/windows/npcdialog.cpp108
-rw-r--r--src/gui/windows/outfitwindow.cpp14
-rw-r--r--src/gui/windows/questswindow.cpp4
-rw-r--r--src/gui/windows/quitdialog.cpp6
-rw-r--r--src/gui/windows/registerdialog.cpp26
-rw-r--r--src/gui/windows/serverdialog.cpp18
-rw-r--r--src/gui/windows/shopwindow.cpp18
-rw-r--r--src/gui/windows/shortcutwindow.cpp6
-rw-r--r--src/gui/windows/skilldialog.cpp6
-rw-r--r--src/gui/windows/socialwindow.cpp4
-rw-r--r--src/gui/windows/statuswindow.cpp28
-rw-r--r--src/gui/windows/textcommandeditor.cpp86
-rw-r--r--src/gui/windows/textdialog.cpp10
-rw-r--r--src/gui/windows/textselectdialog.cpp8
-rw-r--r--src/gui/windows/tradewindow.cpp16
-rw-r--r--src/gui/windows/updaterwindow.cpp10
-rw-r--r--src/gui/windows/worldselectdialog.cpp4
32 files changed, 350 insertions, 346 deletions
diff --git a/src/gui/windows/bankwindow.cpp b/src/gui/windows/bankwindow.cpp
index 242d30aa1..b3c498d4b 100644
--- a/src/gui/windows/bankwindow.cpp
+++ b/src/gui/windows/bankwindow.cpp
@@ -60,10 +60,10 @@ BankWindow::BankWindow() :
mBankMoneyLabel->adjustSize();
ContainerPlacer placer = getPlacer(0, 0);
- placer(0, 0, mBankMoneyLabel, 7);
- placer(0, 1, mInputMoneyTextField, 10);
- placer(0, 2, mDepositButton, 5);
- placer(5, 2, mWithdrawButton, 5);
+ placer(0, 0, mBankMoneyLabel, 7, 1);
+ placer(0, 1, mInputMoneyTextField, 10, 1);
+ placer(0, 2, mDepositButton, 5, 1);
+ placer(5, 2, mWithdrawButton, 5, 1);
setContentSize(300, 100);
setDefaultSize(300, 100, ImagePosition::CENTER, 0, 0);
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index db1dc6e50..14e3aabe0 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -371,36 +371,36 @@ void BuyDialog::init()
ContainerPlacer placer = getPlacer(0, 0);
placer(0, 0, mScrollArea, 9, 5).setPadding(3);
- placer(0, 5, mDecreaseButton);
- placer(1, 5, mSlider, 4);
- placer(5, 5, mIncreaseButton);
- placer(6, 5, mQuantityLabel, 2);
- placer(8, 5, mAddMaxButton);
- placer(0, 6, mAmountLabel, 2);
- placer(2, 6, mAmountField, 2);
- placer(0, 7, mMoneyLabel, 8);
+ placer(0, 5, mDecreaseButton, 1, 1);
+ placer(1, 5, mSlider, 4, 1);
+ placer(5, 5, mIncreaseButton, 1, 1);
+ placer(6, 5, mQuantityLabel, 2, 1);
+ placer(8, 5, mAddMaxButton, 1, 1);
+ placer(0, 6, mAmountLabel, 2, 1);
+ placer(2, 6, mAmountField, 2, 1);
+ placer(0, 7, mMoneyLabel, 8, 1);
if (mSortDropDown != nullptr)
{
- placer(0, 8, mSortDropDown, 2);
+ placer(0, 8, mSortDropDown, 2, 1);
}
else
{
// TRANSLATORS: buy dialog label
mFilterLabel = new Label(this, _("Filter:"));
mFilterLabel->adjustSize();
- placer(0, 8, mFilterLabel, 2);
+ placer(0, 8, mFilterLabel, 2, 1);
}
- placer(2, 8, mFilterTextField, 2);
+ placer(2, 8, mFilterTextField, 2, 1);
if (mAdvanced)
{
- placer(6, 8, mBuyButton);
- placer(7, 8, mConfirmButton);
+ placer(6, 8, mBuyButton, 1, 1);
+ placer(7, 8, mConfirmButton, 1, 1);
}
else
{
- placer(7, 8, mBuyButton);
+ placer(7, 8, mBuyButton, 1, 1);
}
- placer(8, 8, mQuitButton);
+ placer(8, 8, mQuitButton, 1, 1);
Layout &layout = getLayout();
layout.setRowHeight(0, LayoutType::SET);
diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp
index ca29a8ef1..92b023948 100644
--- a/src/gui/windows/changepassworddialog.cpp
+++ b/src/gui/windows/changepassworddialog.cpp
@@ -63,16 +63,16 @@ ChangePasswordDialog::ChangePasswordDialog(LoginData &data) :
// TRANSLATORS: change password dialog label
strprintf(_("Account: %s"), mLoginData->username.c_str()));
- place(0, 0, accountLabel, 3);
+ place(0, 0, accountLabel, 3, 1);
// TRANSLATORS: change password dialog label
place(0, 1, new Label(this, _("Password:")), 3);
- place(0, 2, mOldPassField, 3).setPadding(1);
+ place(0, 2, mOldPassField, 3, 1).setPadding(1);
// TRANSLATORS: change password dialog label
- place(0, 3, new Label(this, _("Type new password twice:")), 3);
- place(0, 4, mFirstPassField, 3).setPadding(1);
- place(0, 5, mSecondPassField, 3).setPadding(1);
- place(1, 6, mCancelButton);
- place(2, 6, mChangePassButton);
+ place(0, 3, new Label(this, _("Type new password twice:")), 3, 1);
+ place(0, 4, mFirstPassField, 3, 1).setPadding(1);
+ place(0, 5, mSecondPassField, 3, 1).setPadding(1);
+ place(1, 6, mCancelButton, 1, 1);
+ place(2, 6, mChangePassButton, 1, 1);
reflowLayout(200);
center();
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index a8da297cb..b4fa77506 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -94,15 +94,15 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
setCloseButton(true);
setFocusable(true);
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
- placer(0, 0, mSwitchLoginButton);
+ placer(0, 0, mSwitchLoginButton, 1, 1);
int n = 1;
- placer(n, 0, mChangePasswordButton);
+ placer(n, 0, mChangePasswordButton, 1, 1);
n ++;
- placer(n, 0, mDeleteButton);
+ placer(n, 0, mDeleteButton, 1, 1);
n ++;
#ifdef TMWA_SUPPORT
if (Net::getNetworkType() != ServerType::TMWATHENA)
@@ -113,10 +113,10 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
_("Rename"),
"rename",
this);
- placer(n, 0, mRenameButton);
+ placer(n, 0, mRenameButton, 1, 1);
n ++;
}
- placer(n, 0, mInfoButton);
+ placer(n, 0, mInfoButton, 1, 1);
n ++;
for (int i = 0; i < CAST_S32(mLoginData->characterSlots); i++)
@@ -126,13 +126,13 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
mCharacterEntries.push_back(character);
}
- placer(0, 2, mPlayButton);
+ placer(0, 2, mPlayButton, 1, 1);
if (!mSmallScreen)
{
mCharacterView = new CharacterViewNormal(
this, &mCharacterEntries, mPadding);
- placer(0, 1, mCharacterView, 10);
+ placer(0, 1, mCharacterView, 10, 1);
int sz = 410 + 2 * mPadding;
if (config.getIntValue("fontSize") > 18)
sz = 500 + 2 * mPadding;
@@ -151,7 +151,7 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
this, &mCharacterEntries, mPadding);
mCharacterView->setWidth(mainGraphics->getWidth()
- 2 * getPadding());
- placer(0, 1, mCharacterView, 10);
+ placer(0, 1, mCharacterView, 10, 1);
reflowLayout();
}
addKeyListener(this);
diff --git a/src/gui/windows/connectiondialog.cpp b/src/gui/windows/connectiondialog.cpp
index ec23ab646..8faf8b859 100644
--- a/src/gui/windows/connectiondialog.cpp
+++ b/src/gui/windows/connectiondialog.cpp
@@ -51,9 +51,9 @@ ConnectionDialog::ConnectionDialog(const std::string &text,
// TRANSLATORS: connection dialog button
this, _("Cancel"), "cancelButton", this);
- place(0, 0, progressIndicator);
- place(0, 1, label);
- place(0, 2, cancelButton).setHAlign(LayoutCell::CENTER);
+ place(0, 0, progressIndicator, 1, 1);
+ place(0, 1, label, 1, 1);
+ place(0, 2, cancelButton, 1, 1).setHAlign(LayoutCell::CENTER);
reflowLayout();
center();
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 64f08a323..20fd26a15 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -92,10 +92,10 @@ DidYouKnowWindow::DidYouKnowWindow() :
mBrowserBox->setEnableTabs(true);
place(0, 0, mScrollArea, 5, 3).setPadding(3);
- place(0, 3, mOpenAgainCheckBox, 5);
- place(1, 4, mButtonPrev, 1);
- place(2, 4, mButtonNext, 1);
- place(4, 4, okButton);
+ place(0, 3, mOpenAgainCheckBox, 5, 1);
+ place(1, 4, mButtonPrev, 1, 1);
+ place(2, 4, mButtonNext, 1, 1);
+ place(4, 4, okButton, 1, 1);
Layout &layout = getLayout();
layout.setRowHeight(0, LayoutType::SET);
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 37683caf5..692fe8287 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -92,24 +92,24 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
mServerAddressField->addActionListener(this);
mPortField->addActionListener(this);
- place(0, 0, nameLabel);
- place(1, 0, mNameField, 4).setPadding(3);
- place(0, 1, serverAdressLabel);
- place(1, 1, mServerAddressField, 4).setPadding(3);
- place(0, 2, portLabel);
- place(1, 2, mPortField, 4).setPadding(3);
- place(0, 3, typeLabel);
- place(1, 3, mTypeField).setPadding(3);
- place(0, 4, descriptionLabel);
- place(1, 4, mDescriptionField, 4).setPadding(3);
- place(0, 5, onlineListUrlLabel);
- place(1, 5, mOnlineListUrlField, 4).setPadding(3);
- place(0, 6, packetVersionLabel);
- place(1, 6, mPacketVersionField, 4).setPadding(3);
- place(0, 7, mPersistentIp, 4).setPadding(3);
- place(0, 8, mConnectButton);
- place(4, 8, mOkButton);
- place(3, 8, mCancelButton);
+ place(0, 0, nameLabel, 1, 1);
+ place(1, 0, mNameField, 4, 1).setPadding(3);
+ place(0, 1, serverAdressLabel, 1, 1);
+ place(1, 1, mServerAddressField, 4, 1).setPadding(3);
+ place(0, 2, portLabel, 1, 1);
+ place(1, 2, mPortField, 4, 1).setPadding(3);
+ place(0, 3, typeLabel, 1, 1);
+ place(1, 3, mTypeField, 1, 1).setPadding(3);
+ place(0, 4, descriptionLabel, 1, 1);
+ place(1, 4, mDescriptionField, 4, 1).setPadding(3);
+ place(0, 5, onlineListUrlLabel, 1, 1);
+ place(1, 5, mOnlineListUrlField, 4, 1).setPadding(3);
+ place(0, 6, packetVersionLabel, 1, 1);
+ place(1, 6, mPacketVersionField, 4, 1).setPadding(3);
+ place(0, 7, mPersistentIp, 4, 1).setPadding(3);
+ place(0, 8, mConnectButton, 1, 1);
+ place(4, 8, mOkButton, 1, 1);
+ place(3, 8, mCancelButton, 1, 1);
// Do this manually instead of calling reflowLayout so we can enforce a
// minimum width.
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 2823c6da9..3dde6c3df 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -88,7 +88,7 @@ HelpWindow::HelpWindow() :
mBrowserBox->setEnableKeys(true);
mBrowserBox->setEnableTabs(true);
- place(4, 3, mDYKButton);
+ place(4, 3, mDYKButton, 1, 1);
place(0, 0, mScrollArea, 5, 3).setPadding(3);
Layout &layout = getLayout();
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 27633f937..ee0d566ce 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -243,21 +243,21 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
// TRANSLATORS: equipment button tooltip
mEquipmentButton->setDescription(_("Equipment"));
- place(0, 0, mWeightBar, 4);
- mSlotsBarCell = &place(4, 0, mSlotsBar, 4);
- mSortDropDownCell = &place(8, 0, mSortDropDown, 3);
+ place(0, 0, mWeightBar, 4, 1);
+ mSlotsBarCell = &place(4, 0, mSlotsBar, 4, 1);
+ mSortDropDownCell = &place(8, 0, mSortDropDown, 3, 1);
- mFilterCell = &place(0, 1, mFilter, 10).setPadding(3);
- mNameFilterCell = &place(8, 1, mNameFilter, 3);
+ mFilterCell = &place(0, 1, mFilter, 10, 1).setPadding(3);
+ mNameFilterCell = &place(8, 1, mNameFilter, 3, 1);
- place(0, 2, invenScroll, 11).setPadding(3);
- place(0, 3, mUseButton);
- place(1, 3, mDropButton);
+ place(0, 2, invenScroll, 11, 1).setPadding(3);
+ place(0, 3, mUseButton, 1, 1);
+ place(1, 3, mDropButton, 1, 1);
ContainerPlacer placer = getPlacer(10, 3);
- placer(0, 0, mShopButton);
- placer(1, 0, mOutfitButton);
- placer(2, 0, mCartButton);
- placer(3, 0, mEquipmentButton);
+ placer(0, 0, mShopButton, 1, 1);
+ placer(1, 0, mOutfitButton, 1, 1);
+ placer(2, 0, mCartButton, 1, 1);
+ placer(3, 0, mEquipmentButton, 1, 1);
updateWeight();
break;
@@ -280,9 +280,9 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mNameFilterCell = &place(6, 1, mNameFilter, 1);
place(0, 2, invenScroll, 7, 4);
- place(0, 6, mStoreButton);
- place(1, 6, mRetrieveButton);
- place(6, 6, mInvCloseButton);
+ place(0, 6, mStoreButton, 1, 1);
+ place(1, 6, mRetrieveButton, 1, 1);
+ place(6, 6, mInvCloseButton, 1, 1);
break;
}
@@ -308,11 +308,11 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mFilterCell = &place(0, 1, mFilter, 7).setPadding(3);
mNameFilterCell = &place(6, 1, mNameFilter, 1);
- place(0, 0, mWeightBar, 3);
+ place(0, 0, mWeightBar, 3, 1);
place(0, 2, invenScroll, 7, 4);
- place(0, 6, mStoreButton);
- place(1, 6, mRetrieveButton);
- place(6, 6, mInvCloseButton);
+ place(0, 6, mStoreButton, 1, 1);
+ place(1, 6, mRetrieveButton, 1, 1);
+ place(6, 6, mInvCloseButton, 1, 1);
break;
}
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 75a2361bf..d8e1c3da0 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -208,21 +208,21 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
minusAmountButton->setWidth(plusAmountButton->getWidth());
// Set positions
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
int n = 0;
if (mUsage == ItemAmountWindowUsage::ShopBuyAdd)
{
- placer(0, n, mItemDropDown, 8);
+ placer(0, n, mItemDropDown, 8, 1);
n++;
}
- placer(1, n, minusAmountButton);
- placer(2, n, mItemAmountTextField, 3);
- placer(5, n, plusAmountButton);
- placer(6, n, addAllButton);
+ placer(1, n, minusAmountButton, 1, 1);
+ placer(2, n, mItemAmountTextField, 3, 1);
+ placer(5, n, plusAmountButton, 1, 1);
+ placer(6, n, addAllButton, 1, 1);
placer(0, n, mItemIcon, 1, 3);
- placer(1, n + 1, mItemAmountSlide, 7);
+ placer(1, n + 1, mItemAmountSlide, 7, 1);
if (mUsage == ItemAmountWindowUsage::ShopBuyAdd ||
mUsage == ItemAmountWindowUsage::ShopSellAdd)
@@ -236,19 +236,19 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
minusPriceButton->adjustSize();
minusPriceButton->setWidth(plusPriceButton->getWidth());
- placer(1, n + 2, minusPriceButton);
- placer(2, n + 2, mItemPriceTextField, 3);
- placer(5, n + 2, plusPriceButton);
- placer(6, n + 2, mGPLabel);
+ placer(1, n + 2, minusPriceButton, 1, 1);
+ placer(2, n + 2, mItemPriceTextField, 3, 1);
+ placer(5, n + 2, plusPriceButton, 1, 1);
+ placer(6, n + 2, mGPLabel, 1, 1);
- placer(1, n + 3, mItemPriceSlide, 7);
- placer(4, n + 5, cancelButton);
- placer(5, n + 5, okButton);
+ placer(1, n + 3, mItemPriceSlide, 7, 1);
+ placer(4, n + 5, cancelButton, 1, 1);
+ placer(5, n + 5, okButton, 1, 1);
}
else
{
- placer(4, n + 2, cancelButton);
- placer(5, n + 2, okButton);
+ placer(4, n + 2, cancelButton, 1, 1);
+ placer(5, n + 2, okButton, 1, 1);
}
reflowLayout(225, 0);
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index 80efb4b36..aabdf80e5 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -138,24 +138,24 @@ KillStats::KillStats() :
strXpPercent.c_str(),
"?"));
- place(0, 0, mLine1, 6).setPadding(0);
- place(0, 1, mLine2, 6).setPadding(0);
- place(0, 2, mLine3, 6).setPadding(0);
- place(0, 3, mLine4, 6).setPadding(0);
- place(0, 4, mLine5, 6).setPadding(0);
- place(0, 5, mLine6, 6).setPadding(0);
- place(0, 6, mLine7, 6).setPadding(0);
-
- place(0, 7, mLastKillExpLabel, 6).setPadding(0);
- place(0, 8, mExpSpeed1Label, 6).setPadding(0);
- place(0, 9, mExpTime1Label, 6).setPadding(0);
- place(0, 10, mExpSpeed5Label, 6).setPadding(0);
- place(0, 11, mExpTime5Label, 6).setPadding(0);
- place(0, 12, mExpSpeed15Label, 6).setPadding(0);
- place(0, 13, mExpTime15Label, 6).setPadding(0);
-
- place(5, 12, mTimerButton).setPadding(0);
- place(5, 13, mResetButton).setPadding(0);
+ place(0, 0, mLine1, 6, 1).setPadding(0);
+ place(0, 1, mLine2, 6, 1).setPadding(0);
+ place(0, 2, mLine3, 6, 1).setPadding(0);
+ place(0, 3, mLine4, 6, 1).setPadding(0);
+ place(0, 4, mLine5, 6, 1).setPadding(0);
+ place(0, 5, mLine6, 6, 1).setPadding(0);
+ place(0, 6, mLine7, 6, 1).setPadding(0);
+
+ place(0, 7, mLastKillExpLabel, 6, 1).setPadding(0);
+ place(0, 8, mExpSpeed1Label, 6, 1).setPadding(0);
+ place(0, 9, mExpTime1Label, 6, 1).setPadding(0);
+ place(0, 10, mExpSpeed5Label, 6, 1).setPadding(0);
+ place(0, 11, mExpTime5Label, 6, 1).setPadding(0);
+ place(0, 12, mExpSpeed15Label, 6, 1).setPadding(0);
+ place(0, 13, mExpTime15Label, 6, 1).setPadding(0);
+
+ place(5, 12, mTimerButton, 1, 1).setPadding(0);
+ place(5, 13, mResetButton, 1, 1).setPadding(0);
loadWindowState();
enableVisibleSound(true);
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 1ae102b42..f9f63fef3 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -148,26 +148,26 @@ LoginDialog::LoginDialog(LoginData &data,
mUserField->addActionListener(this);
mPassField->addActionListener(this);
- place(0, 0, serverLabel1);
- place(1, 0, serverLabel2, 8);
- place(0, 1, userLabel);
- place(1, 1, mUserField, 8);
- place(0, 2, passLabel);
- place(1, 2, mPassField, 8);
- place(0, 6, mUpdateTypeLabel, 1);
- place(1, 6, mUpdateTypeDropDown, 8);
+ place(0, 0, serverLabel1, 1, 1);
+ place(1, 0, serverLabel2, 8, 1);
+ place(0, 1, userLabel, 1, 1);
+ place(1, 1, mUserField, 8, 1);
+ place(0, 2, passLabel, 1, 1);
+ place(1, 2, mPassField, 8, 1);
+ place(0, 6, mUpdateTypeLabel, 1, 1);
+ place(1, 6, mUpdateTypeDropDown, 8, 1);
int n = 7;
if (mUpdateHostDropDown != nullptr)
{
- place(0, 7, mUpdateHostDropDown, 9);
+ place(0, 7, mUpdateHostDropDown, 9, 1);
n += 1;
}
- place(0, n, mCustomUpdateHost, 9);
- place(0, n + 1, mUpdateHostText, 9);
- place(0, n + 2, mKeepCheck, 9);
- place(0, n + 3, mRegisterButton).setHAlign(LayoutCell::LEFT);
- place(2, n + 3, mServerButton);
- place(3, n + 3, mLoginButton);
+ place(0, n, mCustomUpdateHost, 9, 1);
+ place(0, n + 1, mUpdateHostText, 9, 1);
+ place(0, n + 2, mKeepCheck, 9, 1);
+ place(0, n + 3, mRegisterButton, 1, 1).setHAlign(LayoutCell::LEFT);
+ place(2, n + 3, mServerButton, 1, 1);
+ place(3, n + 3, mLoginButton, 1, 1);
addKeyListener(this);
}
diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp
index 5c7b8efec..5ca0d34c6 100644
--- a/src/gui/windows/maileditwindow.cpp
+++ b/src/gui/windows/maileditwindow.cpp
@@ -95,7 +95,7 @@ MailEditWindow::MailEditWindow() :
setMinHeight(200);
center();
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
mToField->setWidth(100);
@@ -105,20 +105,20 @@ MailEditWindow::MailEditWindow() :
mItemScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
mToField->addFocusListener(this);
- placer(0, 0, mToLabel);
- placer(1, 0, mToField, 3);
- placer(0, 1, mSubjectLabel);
- placer(1, 1, mSubjectField, 3);
- placer(0, 2, mMoneyLabel);
- placer(1, 2, mMoneyField, 3);
- placer(0, 3, mItemLabel);
+ placer(0, 0, mToLabel, 1, 1);
+ placer(1, 0, mToField, 3, 1);
+ placer(0, 1, mSubjectLabel, 1, 1);
+ placer(1, 1, mSubjectField, 3, 1);
+ placer(0, 2, mMoneyLabel, 1, 1);
+ placer(1, 2, mMoneyField, 3, 1);
+ placer(0, 3, mItemLabel, 1, 1);
placer(1, 3, mItemScrollArea, 2, 2);
- placer(3, 4, mAddButton, 1);
+ placer(3, 4, mAddButton, 1, 1);
- placer(0, 5, mMessageLabel);
- placer(1, 5, mMessageField, 3);
- placer(0, 6, mSendButton);
- placer(3, 6, mCloseButton);
+ placer(0, 5, mMessageLabel, 1, 1);
+ placer(1, 5, mMessageField, 3, 1);
+ placer(0, 6, mSendButton, 1, 1);
+ placer(3, 6, mCloseButton, 1, 1);
loadWindowState();
if (mUseMail2)
diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp
index fbe0c9112..911cb5de7 100644
--- a/src/gui/windows/mailviewwindow.cpp
+++ b/src/gui/windows/mailviewwindow.cpp
@@ -98,23 +98,23 @@ MailViewWindow::MailViewWindow(MailMessage *const message,
mItemScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
int n = 0;
- placer(0, n++, mTimeLabel);
- placer(0, n++, mFromLabel);
- placer(0, n++, mSubjectLabel);
+ placer(0, n++, mTimeLabel, 1, 1);
+ placer(0, n++, mFromLabel, 1, 1);
+ placer(0, n++, mSubjectLabel, 1, 1);
if (message->money != 0)
{
mMoneyLabel = new Label(this, strprintf("%s %u",
// TRANSLATORS: mail view window label
_("Money:"),
CAST_U32(message->money)));
- placer(0, n++, mMoneyLabel);
+ placer(0, n++, mMoneyLabel, 1, 1);
}
- placer(0, n++, mMessageLabel);
- placer(0, n++, mItemScrollArea);
+ placer(0, n++, mMessageLabel, 1, 1);
+ placer(0, n++, mItemScrollArea, 1, 1);
if (mUseMail2 && message->money != 0)
{
@@ -122,18 +122,18 @@ MailViewWindow::MailViewWindow(MailMessage *const message,
// TRANSLATORS: mail view attached money button
_("Get money"),
"money", this);
- placer(0, n++, mGetMoneyButton);
+ placer(0, n++, mGetMoneyButton, 1, 1);
}
- placer(0, n++, mGetAttachButton);
+ placer(0, n++, mGetAttachButton, 1, 1);
updateAttachButton();
- ContainerPlacer placer2;
+ ContainerPlacer placer2(nullptr, nullptr);
placer2 = getPlacer(0, n);
- placer2(0, 0, mPrevButton);
- placer2(1, 0, mNextButton);
- placer2(3, 0, mReplyButton);
- placer2(4, 0, mCloseButton);
+ placer2(0, 0, mPrevButton, 1, 1);
+ placer2(1, 0, mNextButton, 1, 1);
+ placer2(3, 0, mReplyButton, 1, 1);
+ placer2(4, 0, mCloseButton, 1, 1);
loadWindowState();
enableVisibleSound(true);
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index 9da69fb0a..963b981be 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -98,15 +98,15 @@ MailWindow::MailWindow() :
mListScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
placer(0, 0, mListScrollArea, 4, 5).setPadding(3);
- placer(4, 0, mRefreshButton);
- placer(4, 1, mOpenButton);
- placer(4, 2, mNewButton);
- placer(4, 3, mDeleteButton);
- placer(4, 4, mReturnButton);
+ placer(4, 0, mRefreshButton, 1, 1);
+ placer(4, 1, mOpenButton, 1, 1);
+ placer(4, 2, mNewButton, 1, 1);
+ placer(4, 3, mDeleteButton, 1, 1);
+ placer(4, 4, mReturnButton, 1, 1);
Layout &layout = getLayout();
layout.setRowHeight(0, LayoutType::SET);
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 158bc6dea..ab6e4bc71 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -874,16 +874,16 @@ void NpcDialog::placeNormalControls()
{
if (mShowAvatar)
{
- place(0, 0, mPlayerBox);
+ place(0, 0, mPlayerBox, 1, 1);
place(1, 0, mScrollArea, 5, 3);
- place(4, 3, mClearButton);
- place(5, 3, mButton);
+ place(4, 3, mClearButton, 1, 1);
+ place(5, 3, mButton, 1, 1);
}
else
{
place(0, 0, mScrollArea, 5, 3);
- place(3, 3, mClearButton);
- place(4, 3, mButton);
+ place(3, 3, mClearButton, 1, 1);
+ place(4, 3, mButton, 1, 1);
}
}
@@ -891,20 +891,20 @@ void NpcDialog::placeMenuControls()
{
if (mShowAvatar)
{
- place(0, 0, mPlayerBox);
+ place(0, 0, mPlayerBox, 1, 1);
place(1, 0, mScrollArea, 6, 3);
place(0, 3, mListScrollArea, 7, 3);
- place(1, 6, mButton2, 2);
- place(3, 6, mClearButton, 2);
- place(5, 6, mButton, 2);
+ place(1, 6, mButton2, 2, 1);
+ place(3, 6, mClearButton, 2, 1);
+ place(5, 6, mButton, 2, 1);
}
else
{
place(0, 0, mScrollArea, 6, 3);
place(0, 3, mListScrollArea, 6, 3);
- place(0, 6, mButton2, 2);
- place(2, 6, mClearButton, 2);
- place(4, 6, mButton, 2);
+ place(0, 6, mButton2, 2, 1);
+ place(2, 6, mClearButton, 2, 1);
+ place(4, 6, mButton, 2, 1);
}
}
@@ -915,30 +915,30 @@ void NpcDialog::placeSkinControls()
{
if (mShowAvatar)
{
- place(0, 0, mPlayerBox);
+ place(0, 0, mPlayerBox, 1, 1);
place(1, 0, mSkinScrollArea, 7, 3);
- place(1, 3, mButton2, 2);
+ place(1, 3, mButton2, 2, 1);
}
else
{
place(0, 0, mSkinScrollArea, 6, 3);
- place(0, 3, mButton2, 2);
+ place(0, 3, mButton2, 2, 1);
}
}
else
{
if (mShowAvatar)
{
- place(0, 0, mPlayerBox);
+ place(0, 0, mPlayerBox, 1, 1);
place(1, 0, mScrollArea, 6, 3);
place(0, 3, mSkinScrollArea, 7, 3);
- place(1, 6, mButton2, 2);
+ place(1, 6, mButton2, 2, 1);
}
else
{
place(0, 0, mScrollArea, 6, 3);
place(0, 3, mSkinScrollArea, 6, 3);
- place(0, 6, mButton2, 2);
+ place(0, 6, mButton2, 2, 1);
}
}
}
@@ -947,20 +947,20 @@ void NpcDialog::placeTextInputControls()
{
if (mShowAvatar)
{
- place(0, 0, mPlayerBox);
+ place(0, 0, mPlayerBox, 1, 1);
place(1, 0, mScrollArea, 6, 3);
- place(1, 3, mTextField, 6);
- place(1, 4, mResetButton, 2);
- place(3, 4, mClearButton, 2);
- place(5, 4, mButton, 2);
+ place(1, 3, mTextField, 6, 1);
+ place(1, 4, mResetButton, 2, 1);
+ place(3, 4, mClearButton, 2, 1);
+ place(5, 4, mButton, 2, 1);
}
else
{
place(0, 0, mScrollArea, 6, 3);
- place(0, 3, mTextField, 6);
- place(0, 4, mResetButton, 2);
- place(2, 4, mClearButton, 2);
- place(4, 4, mButton, 2);
+ place(0, 3, mTextField, 6, 1);
+ place(0, 4, mResetButton, 2, 1);
+ place(2, 4, mClearButton, 2, 1);
+ place(4, 4, mButton, 2, 1);
}
}
@@ -968,24 +968,24 @@ void NpcDialog::placeIntInputControls()
{
if (mShowAvatar)
{
- place(0, 0, mPlayerBox);
+ place(0, 0, mPlayerBox, 1, 1);
place(1, 0, mScrollArea, 6, 3);
- place(1, 3, mMinusButton, 1);
- place(2, 3, mIntField, 4);
- place(6, 3, mPlusButton, 1);
- place(1, 4, mResetButton, 2);
- place(3, 4, mClearButton, 2);
- place(5, 4, mButton, 2);
+ place(1, 3, mMinusButton, 1, 1);
+ place(2, 3, mIntField, 4, 1);
+ place(6, 3, mPlusButton, 1, 1);
+ place(1, 4, mResetButton, 2, 1);
+ place(3, 4, mClearButton, 2, 1);
+ place(5, 4, mButton, 2, 1);
}
else
{
place(0, 0, mScrollArea, 6, 3);
- place(0, 3, mMinusButton, 1);
- place(1, 3, mIntField, 4);
- place(5, 3, mPlusButton, 1);
- place(0, 4, mResetButton, 2);
- place(2, 4, mClearButton, 2);
- place(4, 4, mButton, 2);
+ place(0, 3, mMinusButton, 1, 1);
+ place(1, 3, mIntField, 4, 1);
+ place(5, 3, mPlusButton, 1, 1);
+ place(0, 4, mResetButton, 2, 1);
+ place(2, 4, mClearButton, 2, 1);
+ place(4, 4, mButton, 2, 1);
}
}
@@ -1011,38 +1011,38 @@ void NpcDialog::placeItemInputControls()
{
if (mShowAvatar)
{
- place(0, 0, mPlayerBox);
+ place(0, 0, mPlayerBox, 1, 1);
place(1, 0, mItemScrollArea, 7, 3);
- place(1, 3, mButton3, 2);
- place(3, 3, mClearButton, 2);
- place(5, 3, mButton, 2);
+ place(1, 3, mButton3, 2, 1);
+ place(3, 3, mClearButton, 2, 1);
+ place(5, 3, mButton, 2, 1);
}
else
{
place(0, 0, mItemScrollArea, 6, 3);
- place(0, 3, mButton3, 2);
- place(2, 3, mClearButton, 2);
- place(4, 3, mButton, 2);
+ place(0, 3, mButton3, 2, 1);
+ place(2, 3, mClearButton, 2, 1);
+ place(4, 3, mButton, 2, 1);
}
}
else
{
if (mShowAvatar)
{
- place(0, 0, mPlayerBox);
+ place(0, 0, mPlayerBox, 1, 1);
place(1, 0, mScrollArea, 6, 3);
place(0, 3, mItemScrollArea, 7, 3);
- place(1, 6, mButton3, 2);
- place(3, 6, mClearButton, 2);
- place(5, 6, mButton, 2);
+ place(1, 6, mButton3, 2, 1);
+ place(3, 6, mClearButton, 2, 1);
+ place(5, 6, mButton, 2, 1);
}
else
{
place(0, 0, mScrollArea, 6, 3);
place(0, 3, mItemScrollArea, 6, 3);
- place(0, 6, mButton3, 2);
- place(2, 6, mClearButton, 2);
- place(4, 6, mButton, 2);
+ place(0, 6, mButton3, 2, 1);
+ place(2, 6, mClearButton, 2, 1);
+ place(4, 6, mButton, 2, 1);
}
}
}
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index de6319b4c..60d00747e 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -112,13 +112,13 @@ OutfitWindow::OutfitWindow() :
mAwayOutfitCheck->setActionEventId("away");
mAwayOutfitCheck->addActionListener(this);
- place(1, 3, mEquipBottom, 2);
- place(0, 4, mKeyLabel, 4);
- place(0, 5, mPreviousButton, 1);
- place(1, 5, mCurrentLabel, 2);
- place(3, 5, mNextButton, 1);
- place(0, 6, mUnequipCheck, 4);
- place(0, 7, mAwayOutfitCheck, 4);
+ place(1, 3, mEquipBottom, 2, 1);
+ place(0, 4, mKeyLabel, 4, 1);
+ place(0, 5, mPreviousButton, 1, 1);
+ place(1, 5, mCurrentLabel, 2, 1);
+ place(3, 5, mNextButton, 1, 1);
+ place(0, 6, mUnequipCheck, 4, 1);
+ place(0, 7, mAwayOutfitCheck, 4, 1);
Layout &layout = getLayout();
layout.setRowHeight(0, LayoutType::SET);
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 21c3c7f64..08863d86a 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -117,12 +117,12 @@ QuestsWindow::QuestsWindow() :
else
mQuestsListBox->setRowHeight(gui->getNpcFont()->getHeight());
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
placer(0, 0, mQuestScrollArea, 4, 3).setPadding(3);
placer(4, 0, mTextScrollArea, 4, 3).setPadding(3);
- placer(7, 3, mCloseButton);
+ placer(7, 3, mCloseButton, 1, 1);
Layout &layout = getLayout();
layout.setRowHeight(0, LayoutType::SET);
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index b9ef417c3..b14b4c52b 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -113,8 +113,8 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe) :
}
placer = getPlacer(0, 1);
- placer(1, 0, mOkButton, 1);
- placer(2, 0, mCancelButton, 1);
+ placer(1, 0, mOkButton, 1, 1);
+ placer(2, 0, mCancelButton, 1, 1);
reflowLayout(200, 0);
}
@@ -141,7 +141,7 @@ QuitDialog::~QuitDialog()
void QuitDialog::placeOption(ContainerPlacer &placer,
RadioButton *const option)
{
- placer(0, CAST_S32(mOptions.size()), option, 3);
+ placer(0, CAST_S32(mOptions.size()), option, 3, 1);
mOptions.push_back(option);
}
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 699023d93..a033e9000 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -75,15 +75,15 @@ RegisterDialog::RegisterDialog(LoginData &data) :
// TRANSLATORS: register dialog. label.
Label *const confirmLabel = new Label(this, _("Confirm:"));
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
- placer(0, 0, userLabel);
- placer(0, 1, passwordLabel);
- placer(0, 2, confirmLabel);
+ placer(0, 0, userLabel, 1, 1);
+ placer(0, 1, passwordLabel, 1, 1);
+ placer(0, 2, confirmLabel, 1, 1);
- placer(1, 0, mUserField, 3).setPadding(2);
- placer(1, 1, mPasswordField, 3).setPadding(2);
- placer(1, 2, mConfirmField, 3).setPadding(2);
+ placer(1, 0, mUserField, 3, 1).setPadding(2);
+ placer(1, 1, mPasswordField, 3, 1).setPadding(2);
+ placer(1, 2, mConfirmField, 3, 1).setPadding(2);
int row = 3;
@@ -93,8 +93,8 @@ RegisterDialog::RegisterDialog(LoginData &data) :
mMaleButton = new RadioButton(this, _("Male"), "sex", true);
// TRANSLATORS: register dialog. button.
mFemaleButton = new RadioButton(this, _("Female"), "sex", false);
- placer(1, row, mMaleButton);
- placer(2, row, mFemaleButton);
+ placer(1, row, mMaleButton, 1, 1);
+ placer(2, row, mFemaleButton, 1, 1);
row++;
}
@@ -104,8 +104,8 @@ RegisterDialog::RegisterDialog(LoginData &data) :
// TRANSLATORS: register dialog. label.
Label *const emailLabel = new Label(this, _("Email:"));
mEmailField = new TextField(this);
- placer(0, row, emailLabel);
- placer(1, row, mEmailField, 3).setPadding(2);
+ placer(0, row, emailLabel, 1, 1);
+ placer(1, row, mEmailField, 3, 1).setPadding(2);
mEmailField->addKeyListener(this);
mEmailField->setActionEventId("register");
mEmailField->addActionListener(this);
@@ -113,8 +113,8 @@ RegisterDialog::RegisterDialog(LoginData &data) :
}
placer = getPlacer(0, 2);
- placer(1, 0, mRegisterButton);
- placer(2, 0, mCancelButton);
+ placer(1, 0, mRegisterButton, 1, 1);
+ placer(2, 0, mCancelButton, 1, 1);
reflowLayout(250, 0);
mUserField->addKeyListener(this);
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 1970e8ca4..72b8fdf1f 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -155,15 +155,15 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
usedScroll->setVerticalScrollAmount(0);
place(0, 0, usedScroll, 8, 5).setPadding(3);
- place(0, 5, mDescription, 8);
- place(0, 6, mPersistentIPCheckBox, 8);
- place(0, 7, mInfoButton);
- place(1, 7, mAddEntryButton);
- place(2, 7, mEditEntryButton);
- place(3, 7, mLoadButton);
- place(4, 7, mDeleteButton);
- place(6, 7, mQuitButton);
- place(7, 7, mConnectButton);
+ place(0, 5, mDescription, 8, 1);
+ place(0, 6, mPersistentIPCheckBox, 8, 1);
+ place(0, 7, mInfoButton, 1, 1);
+ place(1, 7, mAddEntryButton, 1, 1);
+ place(2, 7, mEditEntryButton, 1, 1);
+ place(3, 7, mLoadButton, 1, 1);
+ place(4, 7, mDeleteButton, 1, 1);
+ place(6, 7, mQuitButton, 1, 1);
+ place(7, 7, mConnectButton, 1, 1);
// Make sure the list has enough height
getLayout().setRowHeight(0, 80);
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 6ffd2649a..57406fb4b 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -181,10 +181,10 @@ ShopWindow::ShopWindow() :
mBuyShopItemList->addSelectionListener(this);
mSellShopItemList->addSelectionListener(this);
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
- placer(0, 0, mTabs, 8).setPadding(3);
+ placer(0, 0, mTabs, 8, 1).setPadding(3);
if (mHaveVending)
{
@@ -192,8 +192,8 @@ ShopWindow::ShopWindow() :
mPublishButton = new Button(this, _("Publish"), "publish", this);
// TRANSLATORS: shop window button
mRenameButton = new Button(this, _("Rename"), "rename", this);
- placer(2, 6, mPublishButton);
- placer(3, 6, mRenameButton);
+ placer(2, 6, mPublishButton, 1, 1);
+ placer(3, 6, mRenameButton, 1, 1);
}
else
{
@@ -203,14 +203,14 @@ ShopWindow::ShopWindow() :
mAnnounceLinks = new CheckBox(this, _("Show links in announce"), false,
this, "link announce");
- placer(2, 6, mAnnounceButton);
- placer(0, 7, mAnnounceLinks, 7);
+ placer(2, 6, mAnnounceButton, 1, 1);
+ placer(0, 7, mAnnounceLinks, 7, 1);
}
placer(0, 1, mScrollArea, 8, 5).setPadding(3);
- placer(0, 6, mAddButton);
- placer(1, 6, mDeleteButton);
- placer(7, 6, mCloseButton);
+ placer(0, 6, mAddButton, 1, 1);
+ placer(1, 6, mDeleteButton, 1, 1);
+ placer(7, 6, mCloseButton, 1, 1);
Layout &layout = getLayout();
layout.setRowHeight(0, LayoutType::SET);
diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp
index bff1efe58..efc66872f 100644
--- a/src/gui/windows/shortcutwindow.cpp
+++ b/src/gui/windows/shortcutwindow.cpp
@@ -162,7 +162,11 @@ void ShortcutWindow::addButton(const std::string &text,
const std::string &eventName,
ActionListener *const listener)
{
- place(mButtonIndex++, 5, new Button(this, text, eventName, listener));
+ place(mButtonIndex++,
+ 5,
+ new Button(this, text, eventName, listener),
+ 1,
+ 1);
Window::widgetResized(Event(nullptr));
}
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 347435fec..64fce95cd 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -112,9 +112,9 @@ SkillDialog::SkillDialog() :
mTabs->getWidgetContainer()->setSelectable(false);
place(0, 0, mTabs, 5, 5);
- place(0, 5, mPointsLabel, 4);
- place(3, 5, mUseButton);
- place(4, 5, mIncreaseButton);
+ place(0, 5, mPointsLabel, 4, 1);
+ place(3, 5, mUseButton, 1, 1);
+ place(4, 5, mIncreaseButton, 1, 1);
}
void SkillDialog::postInit()
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index cbdf1d68d..062041b32 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -98,8 +98,8 @@ void SocialWindow::postInit()
if (setupWindow != nullptr)
setupWindow->registerWindowForReset(this);
- place(0, 0, mMenuButton);
- place(0, 1, mCountLabel);
+ place(0, 0, mMenuButton, 1, 1);
+ place(0, 1, mCountLabel, 1, 1);
place(0, 2, mTabs, 2, 4);
widgetResized(Event(nullptr));
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 841e64505..43a4b05e4 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -166,17 +166,17 @@ StatusWindow::StatusWindow() :
getThemeColor(ThemeColorId::NO_MP_BAR_OUTLINE, 255U));
}
- place(0, 0, mLvlLabel, 3);
- place(0, 1, mHpLabel).setPadding(3);
- place(1, 1, mHpBar, 4);
- place(5, 1, mXpLabel).setPadding(3);
- place(6, 1, mXpBar, 5);
- place(0, 2, mMpLabel).setPadding(3);
+ place(0, 0, mLvlLabel, 3, 1);
+ place(0, 1, mHpLabel, 1, 1).setPadding(3);
+ place(1, 1, mHpBar, 4, 1);
+ place(5, 1, mXpLabel, 1, 1).setPadding(3);
+ place(6, 1, mXpBar, 5, 1);
+ place(0, 2, mMpLabel, 1, 1).setPadding(3);
// 5, 2 and 6, 2 Job Progress Bar
if (job)
- place(1, 2, mMpBar, 4);
+ place(1, 2, mMpBar, 4, 1);
else
- place(1, 2, mMpBar, 10);
+ place(1, 2, mMpBar, 10, 1);
if (job)
{
@@ -190,24 +190,24 @@ StatusWindow::StatusWindow() :
getThemeColor(ThemeColorId::JOB_BAR_OUTLINE, 255U));
mJobBar->setSelectable(false);
- place(3, 0, mJobLvlLabel, 3);
- place(5, 2, mJobLabel).setPadding(3);
- place(6, 2, mJobBar, 5);
- place(6, 0, mMoneyLabel, 3);
+ place(3, 0, mJobLvlLabel, 3, 1);
+ place(5, 2, mJobLabel, 1, 1).setPadding(3);
+ place(6, 2, mJobBar, 5, 1);
+ place(6, 0, mMoneyLabel, 3, 1);
}
else
{
mJobLvlLabel = nullptr;
mJobLabel = nullptr;
mJobBar = nullptr;
- place(3, 0, mMoneyLabel, 3);
+ place(3, 0, mMoneyLabel, 3, 1);
}
place(0, 3, mTabs, 11, 3);
getLayout().setRowHeight(3, LayoutType::SET);
- place(0, 5, mCopyButton);
+ place(0, 5, mCopyButton, 1, 1);
loadWindowState();
enableVisibleSound(true);
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index 88d88af8a..2210b2870 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -163,58 +163,58 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
#endif // TMWA_SUPPORT
}
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
#ifdef TMWA_SUPPORT
- placer(0, 0, mIsMagic, 1);
- placer(2, 0, mIsOther, 1);
- placer(0, 1, mSymbolLabel, 2).setPadding(3);
- placer(2, 1, mSymbolTextField, 3).setPadding(3);
- placer(0, 2, mCommandLabel, 2).setPadding(3);
- placer(2, 2, mCommandTextField, 4).setPadding(3);
-
- placer(0, 3, mCommentLabel, 2).setPadding(3);
- placer(2, 3, mCommentTextField, 4).setPadding(3);
-
- placer(0, 4, mTypeLabel, 2).setPadding(3);
- placer(2, 4, mTypeDropDown, 3).setPadding(3);
-
- placer(0, 5, mIconLabel, 2).setPadding(3);
- placer(2, 5, mIconDropDown, 3).setPadding(3);
-
- placer(0, 6, mManaLabel, 2).setPadding(3);
- placer(2, 6, mManaField, 3).setPadding(3);
- placer(0, 7, mMagicLvlLabel, 2).setPadding(3);
- placer(2, 7, mMagicLvlField, 3).setPadding(3);
-
- placer(0, 8, mSchoolLabel, 2).setPadding(3);
- placer(2, 8, mSchoolDropDown, 3).setPadding(3);
- placer(0, 9, mSchoolLvlLabel, 2).setPadding(3);
- placer(2, 9, mSchoolLvlField, 3).setPadding(3);
-
- placer(0, 10, mSaveButton, 2).setPadding(3);
- placer(2, 10, mCancelButton, 2).setPadding(3);
- placer(4, 10, mDeleteButton, 2).setPadding(3);
+ placer(0, 0, mIsMagic, 1, 1);
+ placer(2, 0, mIsOther, 1, 1);
+ placer(0, 1, mSymbolLabel, 2, 1).setPadding(3);
+ placer(2, 1, mSymbolTextField, 3, 1).setPadding(3);
+ placer(0, 2, mCommandLabel, 2, 1).setPadding(3);
+ placer(2, 2, mCommandTextField, 4, 1).setPadding(3);
+
+ placer(0, 3, mCommentLabel, 2, 1).setPadding(3);
+ placer(2, 3, mCommentTextField, 4, 1).setPadding(3);
+
+ placer(0, 4, mTypeLabel, 2, 1).setPadding(3);
+ placer(2, 4, mTypeDropDown, 3, 1).setPadding(3);
+
+ placer(0, 5, mIconLabel, 2, 1).setPadding(3);
+ placer(2, 5, mIconDropDown, 3, 1).setPadding(3);
+
+ placer(0, 6, mManaLabel, 2, 1).setPadding(3);
+ placer(2, 6, mManaField, 3, 1).setPadding(3);
+ placer(0, 7, mMagicLvlLabel, 2, 1).setPadding(3);
+ placer(2, 7, mMagicLvlField, 3, 1).setPadding(3);
+
+ placer(0, 8, mSchoolLabel, 2, 1).setPadding(3);
+ placer(2, 8, mSchoolDropDown, 3, 1).setPadding(3);
+ placer(0, 9, mSchoolLvlLabel, 2, 1).setPadding(3);
+ placer(2, 9, mSchoolLvlField, 3, 1).setPadding(3);
+
+ placer(0, 10, mSaveButton, 2, 1).setPadding(3);
+ placer(2, 10, mCancelButton, 2, 1).setPadding(3);
+ placer(4, 10, mDeleteButton, 2, 1).setPadding(3);
#else // TMWA_SUPPORT
- placer(0, 0, mSymbolLabel, 2).setPadding(3);
- placer(2, 0, mSymbolTextField, 3).setPadding(3);
- placer(0, 1, mCommandLabel, 2).setPadding(3);
- placer(2, 1, mCommandTextField, 4).setPadding(3);
+ placer(0, 0, mSymbolLabel, 2, 1).setPadding(3);
+ placer(2, 0, mSymbolTextField, 3, 1).setPadding(3);
+ placer(0, 1, mCommandLabel, 2, 1).setPadding(3);
+ placer(2, 1, mCommandTextField, 4, 1).setPadding(3);
- placer(0, 2, mCommentLabel, 2).setPadding(3);
- placer(2, 2, mCommentTextField, 4).setPadding(3);
+ placer(0, 2, mCommentLabel, 2, 1).setPadding(3);
+ placer(2, 2, mCommentTextField, 4, 1).setPadding(3);
- placer(0, 3, mTypeLabel, 2).setPadding(3);
- placer(2, 3, mTypeDropDown, 3).setPadding(3);
+ placer(0, 3, mTypeLabel, 2, 1).setPadding(3);
+ placer(2, 3, mTypeDropDown, 3, 1).setPadding(3);
- placer(0, 4, mIconLabel, 2).setPadding(3);
- placer(2, 4, mIconDropDown, 3).setPadding(3);
+ placer(0, 4, mIconLabel, 2, 1).setPadding(3);
+ placer(2, 4, mIconDropDown, 3, 1).setPadding(3);
- placer(0, 5, mSaveButton, 2).setPadding(3);
- placer(2, 5, mCancelButton, 2).setPadding(3);
- placer(4, 5, mDeleteButton, 2).setPadding(3);
+ placer(0, 5, mSaveButton, 2, 1).setPadding(3);
+ placer(2, 5, mCancelButton, 2, 1).setPadding(3);
+ placer(4, 5, mDeleteButton, 2, 1).setPadding(3);
#endif // TMWA_SUPPORT
setWidth(w);
diff --git a/src/gui/windows/textdialog.cpp b/src/gui/windows/textdialog.cpp
index 87c9dcfa8..ee6e58a00 100644
--- a/src/gui/windows/textdialog.cpp
+++ b/src/gui/windows/textdialog.cpp
@@ -59,19 +59,19 @@ TextDialog::TextDialog(const std::string &restrict title,
// TRANSLATORS: text dialog button
Button *const cancelButton = new Button(this, _("Cancel"), "CANCEL", this);
- place(0, 0, textLabel, 4);
+ place(0, 0, textLabel, 4, 1);
if (isPassword)
{
mPasswordField = new PasswordField(this);
- place(0, 1, mPasswordField, 4);
+ place(0, 1, mPasswordField, 4, 1);
}
else
{
mTextField = new TextField(this);
- place(0, 1, mTextField, 4);
+ place(0, 1, mTextField, 4, 1);
}
- place(2, 2, mOkButton);
- place(3, 2, cancelButton);
+ place(2, 2, mOkButton, 1, 1);
+ place(3, 2, cancelButton, 1, 1);
int width = getFont()->getWidth(title);
if (width < textLabel->getWidth())
diff --git a/src/gui/windows/textselectdialog.cpp b/src/gui/windows/textselectdialog.cpp
index 11100d2d8..ce4b7e73d 100644
--- a/src/gui/windows/textselectdialog.cpp
+++ b/src/gui/windows/textselectdialog.cpp
@@ -101,18 +101,18 @@ void TextSelectDialog::postInit()
mItemList->setActionEventId("item");
mItemList->addActionListener(this);
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
placer(0, 0, mScrollArea, 8, 5).setPadding(3);
if (mQuitButton != nullptr)
{
- placer(6, 5, mSelectButton);
- placer(7, 5, mQuitButton);
+ placer(6, 5, mSelectButton, 1, 1);
+ placer(7, 5, mQuitButton, 1, 1);
}
else
{
- placer(7, 5, mSelectButton);
+ placer(7, 5, mSelectButton, 1, 1);
}
Layout &layout = getLayout();
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index d11023fdb..3f16b0b4b 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -136,16 +136,16 @@ TradeWindow::TradeWindow() :
mMoneyField->setWidth(40);
- place(1, 0, mMoneyLabel);
- place(0, 1, myScroll).setPadding(3);
- place(1, 1, partnerScroll).setPadding(3);
+ place(1, 0, mMoneyLabel, 1, 1);
+ place(0, 1, myScroll, 1, 1).setPadding(3);
+ place(1, 1, partnerScroll, 1, 1).setPadding(3);
ContainerPlacer placer = getPlacer(0, 0);
- placer(0, 0, moneyLabel2);
- placer(1, 0, mMoneyField, 2);
- placer(3, 0, mMoneyChangeButton).setHAlign(LayoutCell::LEFT);
+ placer(0, 0, moneyLabel2, 1, 1);
+ placer(1, 0, mMoneyField, 2, 1);
+ placer(3, 0, mMoneyChangeButton, 1, 1).setHAlign(LayoutCell::LEFT);
placer = getPlacer(0, 2);
- placer(0, 0, mAddButton);
- placer(1, 0, mOkButton);
+ placer(0, 0, mAddButton, 1, 1);
+ placer(1, 0, mOkButton, 1, 1);
Layout &layout = getLayout();
layout.extend(0, 2, 2, 1);
layout.setRowHeight(1, LayoutType::SET);
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 5bff64bc3..c8eefbac6 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -226,14 +226,14 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
mBrowserBox->setEnableTabs(true);
mPlayButton->setEnabled(false);
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
placer(0, 0, mScrollArea, 5, 3).setPadding(3);
- placer(0, 3, mLabel, 5);
- placer(0, 4, mProgressBar, 5);
- placer(3, 5, mCancelButton);
- placer(4, 5, mPlayButton);
+ placer(0, 3, mLabel, 5, 1);
+ placer(0, 4, mProgressBar, 5, 1);
+ placer(3, 5, mCancelButton, 1, 1);
+ placer(4, 5, mPlayButton, 1, 1);
Layout &layout = getLayout();
layout.setRowHeight(0, LayoutType::SET);
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index 919440a40..87907845e 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -61,8 +61,8 @@ WorldSelectDialog::WorldSelectDialog(const Worlds &worlds) :
worldsScroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
place(0, 0, worldsScroll, 3, 5).setPadding(2);
- place(1, 5, mChangeLoginButton);
- place(2, 5, mChooseWorld);
+ place(1, 5, mChangeLoginButton, 1, 1);
+ place(2, 5, mChooseWorld, 1, 1);
// Make sure the list has enough height
getLayout().setRowHeight(0, 60);