summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/attrs/changedisplay.cpp8
-rw-r--r--src/gui/widgets/attrs/derdisplay.cpp4
-rw-r--r--src/gui/widgets/characterdisplay.cpp2
-rw-r--r--src/gui/widgets/containerplacer.h8
-rw-r--r--src/gui/widgets/selldialog.cpp26
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.cpp60
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp32
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp10
-rw-r--r--src/gui/widgets/tabs/setup_joystick.cpp12
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp12
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp50
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp24
-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
44 files changed, 474 insertions, 470 deletions
diff --git a/src/gui/widgets/attrs/changedisplay.cpp b/src/gui/widgets/attrs/changedisplay.cpp
index a24057af5..d5a598545 100644
--- a/src/gui/widgets/attrs/changedisplay.cpp
+++ b/src/gui/widgets/attrs/changedisplay.cpp
@@ -52,10 +52,10 @@ ChangeDisplay::ChangeDisplay(const Widget2 *const widget,
// Do the layout
ContainerPlacer place = mLayout->getPlacer(0, 0);
- place(0, 0, mLabel, 3);
- place(4, 0, mValue, 2);
- place(6, 0, mInc);
- place(7, 0, mPoints);
+ place(0, 0, mLabel, 3, 1);
+ place(4, 0, mValue, 2, 1);
+ place(6, 0, mInc, 1, 1);
+ place(7, 0, mPoints, 1, 1);
}
std::string ChangeDisplay::update()
diff --git a/src/gui/widgets/attrs/derdisplay.cpp b/src/gui/widgets/attrs/derdisplay.cpp
index 2c20c3713..5bb05b719 100644
--- a/src/gui/widgets/attrs/derdisplay.cpp
+++ b/src/gui/widgets/attrs/derdisplay.cpp
@@ -35,6 +35,6 @@ DerDisplay::DerDisplay(const Widget2 *const widget,
{
ContainerPlacer place = mLayout->getPlacer(0, 0);
- place(0, 0, mLabel, 3);
- place(3, 0, mValue, 2);
+ place(0, 0, mLabel, 3, 1);
+ place(3, 0, mValue, 2, 1);
}
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index e5743615a..68082a687 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -59,7 +59,7 @@ CharacterDisplay::CharacterDisplay(const Widget2 *const widget,
ContainerPlacer placer = h.getPlacer(0, 0);
placer(0, 0, mPlayerBox, 3, 5);
- placer(0, 5, mName, 3);
+ placer(0, 5, mName, 3, 1);
update();
diff --git a/src/gui/widgets/containerplacer.h b/src/gui/widgets/containerplacer.h
index cd1e0221e..fa24b7720 100644
--- a/src/gui/widgets/containerplacer.h
+++ b/src/gui/widgets/containerplacer.h
@@ -35,8 +35,8 @@ class Widget;
class ContainerPlacer final
{
public:
- explicit ContainerPlacer(BasicContainer2 *const c = nullptr,
- LayoutCell *const lc = nullptr) :
+ ContainerPlacer(BasicContainer2 *const c,
+ LayoutCell *const lc) :
mContainer(c),
mCell(lc)
{}
@@ -62,8 +62,8 @@ class ContainerPlacer final
LayoutCell &operator()(const int x,
const int y,
Widget *const wg,
- const int w = 1,
- const int h = 1);
+ const int w,
+ const int h);
private:
BasicContainer2 *mContainer;
diff --git a/src/gui/widgets/selldialog.cpp b/src/gui/widgets/selldialog.cpp
index 68b9a039f..d60e10803 100644
--- a/src/gui/widgets/selldialog.cpp
+++ b/src/gui/widgets/selldialog.cpp
@@ -128,7 +128,7 @@ void SellDialog::postInit()
mShopItemList->setActionEventId("sell");
mShopItemList->addActionListener(this);
- ContainerPlacer placer;
+ ContainerPlacer placer(nullptr, nullptr);
placer = getPlacer(0, 0);
if (mIsSell == IsSell_true)
@@ -163,28 +163,28 @@ void SellDialog::postInit()
mSlider->addActionListener(this);
placer(0, 0, mScrollArea, 8, 5).setPadding(3);
- placer(0, 5, mDecreaseButton);
- placer(1, 5, mSlider, 3);
- placer(4, 5, mIncreaseButton);
- placer(5, 5, mQuantityLabel, 2);
- placer(7, 5, mAddMaxButton);
- placer(0, 6, mMoneyLabel, 8);
+ placer(0, 5, mDecreaseButton, 1, 1);
+ placer(1, 5, mSlider, 3, 1);
+ placer(4, 5, mIncreaseButton, 1, 1);
+ placer(5, 5, mQuantityLabel, 2, 1);
+ placer(7, 5, mAddMaxButton, 1, 1);
+ placer(0, 6, mMoneyLabel, 8, 1);
if (mAdvanced == Advanced_true)
{
- placer(5, 7, mSellButton);
- placer(6, 7, mConfirmButton);
+ placer(5, 7, mSellButton, 1, 1);
+ placer(6, 7, mConfirmButton, 1, 1);
}
else
{
- placer(6, 7, mSellButton);
+ placer(6, 7, mSellButton, 1, 1);
}
- placer(7, 7, mQuitButton);
+ placer(7, 7, mQuitButton, 1, 1);
}
else
{
placer(0, 0, mScrollArea, 8, 5).setPadding(3);
- placer(6, 5, mSellButton);
- placer(7, 5, mQuitButton);
+ placer(6, 5, mSellButton, 1, 1);
+ placer(7, 5, mQuitButton, 1, 1);
}
Layout &layout = getLayout();
diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp
index 6199fccca..67eb10a1d 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.cpp
+++ b/src/gui/widgets/tabs/debugwindowtabs.cpp
@@ -131,16 +131,16 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
mFPSText = _("%d FPS (Software)");
#endif // USE_OPENGL
- place(0, 0, mFPSLabel, 2);
- place(0, 1, mLPSLabel, 2);
- place(0, 2, mMusicFileLabel, 2);
- place(0, 3, mMapLabel, 2);
- place(0, 4, mMapNameLabel, 2);
- place(0, 5, mMinimapLabel, 2);
- place(0, 6, mXYLabel, 2);
- place(0, 7, mTileMouseLabel, 2);
- place(0, 8, mParticleCountLabel, 2);
- place(0, 9, mMapActorCountLabel, 2);
+ place(0, 0, mFPSLabel, 2, 1);
+ place(0, 1, mLPSLabel, 2, 1);
+ place(0, 2, mMusicFileLabel, 2, 1);
+ place(0, 3, mMapLabel, 2, 1);
+ place(0, 4, mMapNameLabel, 2, 1);
+ place(0, 5, mMinimapLabel, 2, 1);
+ place(0, 6, mXYLabel, 2, 1);
+ place(0, 7, mTileMouseLabel, 2, 1);
+ place(0, 8, mParticleCountLabel, 2, 1);
+ place(0, 9, mMapActorCountLabel, 2, 1);
#ifdef USE_OPENGL
#if defined (DEBUG_OPENGL_LEAKS) || defined(DEBUG_DRAW_CALLS) \
|| defined(DEBUG_BIND_TEXTURE)
@@ -151,15 +151,15 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
mTexturesLabel = new Label(this, strprintf("%s %s",
// TRANSLATORS: debug window label
_("Textures count:"), "?"));
- place(0, n, mTexturesLabel, 2);
+ place(0, n, mTexturesLabel, 2, 1);
n ++;
#endif // DEBUG_OPENGL_LEAKS
#ifdef DEBUG_DRAW_CALLS
- place(0, n, mDrawCallsLabel, 2);
+ place(0, n, mDrawCallsLabel, 2, 1);
n ++;
#endif // DEBUG_DRAW_CALLS
#ifdef DEBUG_BIND_TEXTURE
- place(0, n, mBindsLabel, 2);
+ place(0, n, mBindsLabel, 2, 1);
#endif // DEBUG_BIND_TEXTURE
#endif // USE_OPENGL
@@ -308,20 +308,20 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) :
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
- place(0, 0, mTargetLabel, 2);
- place(0, 1, mTargetIdLabel, 2);
- place(0, 2, mTargetTypeLabel, 2);
- place(0, 3, mTargetLevelLabel, 2);
- place(0, 4, mTargetRaceLabel, 2);
- place(0, 5, mAttackDelayLabel, 2);
- place(0, 6, mTargetPartyLabel, 2);
- place(0, 7, mTargetGuildLabel, 2);
- place(0, 8, mMinHitLabel, 2);
- place(0, 9, mMaxHitLabel, 2);
- place(0, 10, mCriticalHitLabel, 2);
- place(0, 11, mKarmaLabel, 2);
- place(0, 12, mMannerLabel, 2);
- place(0, 13, mEffectsLabel, 2);
+ place(0, 0, mTargetLabel, 2, 1);
+ place(0, 1, mTargetIdLabel, 2, 1);
+ place(0, 2, mTargetTypeLabel, 2, 1);
+ place(0, 3, mTargetLevelLabel, 2, 1);
+ place(0, 4, mTargetRaceLabel, 2, 1);
+ place(0, 5, mAttackDelayLabel, 2, 1);
+ place(0, 6, mTargetPartyLabel, 2, 1);
+ place(0, 7, mTargetGuildLabel, 2, 1);
+ place(0, 8, mMinHitLabel, 2, 1);
+ place(0, 9, mMaxHitLabel, 2, 1);
+ place(0, 10, mCriticalHitLabel, 2, 1);
+ place(0, 11, mKarmaLabel, 2, 1);
+ place(0, 12, mMannerLabel, 2, 1);
+ place(0, 13, mEffectsLabel, 2, 1);
place.getCell().matchColWidth(0, 0);
place = h.getPlacer(0, 1);
@@ -459,9 +459,9 @@ NetDebugTab::NetDebugTab(const Widget2 *const widget) :
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
- place(0, 0, mPingLabel, 2);
- place(0, 1, mInPackets1Label, 2);
- place(0, 2, mOutPackets1Label, 2);
+ place(0, 0, mPingLabel, 2, 1);
+ place(0, 1, mInPackets1Label, 2, 1);
+ place(0, 2, mOutPackets1Label, 2, 1);
place.getCell().matchColWidth(0, 0);
place = h.getPlacer(0, 1);
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index f6f8dc386..cdbda9415 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -177,22 +177,22 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) :
ContainerPlacer place = h.getPlacer(0, 0);
place(0, 0, mScroll, 6, 6).setPadding(2);
- place(0, 6, mPreviewBox, 6).setPadding(2);
- place(0, 7, mGradTypeLabel, 3);
- place(3, 7, mGradTypeSlider);
- place(4, 7, mGradTypeText, 2).setPadding(1);
- place(0, 8, mRedLabel, 3);
- place(3, 8, mRedSlider);
- place(5, 8, mRedText).setPadding(1);
- place(0, 9, mGreenLabel, 3);
- place(3, 9, mGreenSlider);
- place(5, 9, mGreenText).setPadding(1);
- place(0, 10, mBlueLabel, 3);
- place(3, 10, mBlueSlider);
- place(5, 10, mBlueText).setPadding(1);
- place(0, 11, mGradDelayLabel, 3);
- place(3, 11, mGradDelaySlider);
- place(5, 11, mGradDelayText).setPadding(1);
+ place(0, 6, mPreviewBox, 6, 1).setPadding(2);
+ place(0, 7, mGradTypeLabel, 3, 1);
+ place(3, 7, mGradTypeSlider, 1, 1);
+ place(4, 7, mGradTypeText, 2, 1).setPadding(1);
+ place(0, 8, mRedLabel, 3, 1);
+ place(3, 8, mRedSlider, 1, 1);
+ place(5, 8, mRedText, 1, 1).setPadding(1);
+ place(0, 9, mGreenLabel, 3, 1);
+ place(3, 9, mGreenSlider, 1, 1);
+ place(5, 9, mGreenText, 1, 1).setPadding(1);
+ place(0, 10, mBlueLabel, 3, 1);
+ place(3, 10, mBlueSlider, 1, 1);
+ place(5, 10, mBlueText, 1, 1).setPadding(1);
+ place(0, 11, mGradDelayLabel, 3, 1);
+ place(3, 11, mGradDelaySlider, 1, 1);
+ place(5, 11, mGradDelayText, 1, 1).setPadding(1);
mGradTypeText->setCaption("");
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index ec03b0591..016163d77 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -118,12 +118,12 @@ Setup_Input::Setup_Input(const Widget2 *const widget) :
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
- place(0, 0, mTabs, 5);
+ place(0, 0, mTabs, 5, 1);
place(0, 1, mScrollArea, 5, 5).setPadding(2);
- place(0, 6, mResetKeysButton);
- place(2, 6, mAssignKeyButton);
- place(3, 6, mUnassignKeyButton);
- place(4, 6, mDefaultButton);
+ place(0, 6, mResetKeysButton, 1, 1);
+ place(2, 6, mAssignKeyButton, 1, 1);
+ place(3, 6, mUnassignKeyButton, 1, 1);
+ place(4, 6, mDefaultButton, 1, 1);
int width = 600;
if (config.getIntValue("screenwidth") >= 730)
diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp
index 84cd60521..12fd49b23 100644
--- a/src/gui/widgets/tabs/setup_joystick.cpp
+++ b/src/gui/widgets/tabs/setup_joystick.cpp
@@ -87,12 +87,12 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) :
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
- place(0, 0, mJoystickEnabled);
- place(0, 1, mNamesDropDown);
- place(0, 2, mUseInactiveCheckBox);
- place(0, 3, mDetectButton);
- place(0, 4, mCalibrateLabel);
- place(0, 5, mCalibrateButton);
+ place(0, 0, mJoystickEnabled, 1, 1);
+ place(0, 1, mNamesDropDown, 1, 1);
+ place(0, 2, mUseInactiveCheckBox, 1, 1);
+ place(0, 3, mDetectButton, 1, 1);
+ place(0, 4, mCalibrateLabel, 1, 1);
+ place(0, 5, mCalibrateButton, 1, 1);
setDimension(Rect(0, 0, 365, 75));
}
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index d81774694..fa182bccc 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -129,13 +129,13 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) :
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
- place(0, 0, mPlayerTitleTable, 6);
+ place(0, 0, mPlayerTitleTable, 6, 1);
place(0, 1, mPlayerScrollArea, 6, 4).setPadding(2);
- place(0, 5, mDeleteButton);
- place(3, 5, ignore_action_label, 1);
- place(4, 5, mIgnoreActionChoicesBox, 2).setPadding(2);
- place(3, 6, mDefaultTrading, 3);
- place(3, 7, mDefaultWhisper, 3);
+ place(0, 5, mDeleteButton, 1, 1);
+ place(3, 5, ignore_action_label, 1, 1);
+ place(4, 5, mIgnoreActionChoicesBox, 2, 1).setPadding(2);
+ place(3, 6, mDefaultTrading, 3, 1);
+ place(3, 7, mDefaultWhisper, 3, 1);
playerRelations.addListener(this);
diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp
index 47cbb2b92..e8baed86f 100644
--- a/src/gui/widgets/tabs/setup_theme.cpp
+++ b/src/gui/widgets/tabs/setup_theme.cpp
@@ -184,33 +184,33 @@ Setup_Theme::Setup_Theme(const Widget2 *const widget) :
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
- place(0, 0, mThemeLabel, 5);
- place(0, 1, mLangLabel, 5);
- place(0, 2, mFontSizeLabel, 5);
- place(0, 3, mNpcFontSizeLabel, 5);
- place(0, 4, mFontLabel, 5);
- place(0, 5, mBoldFontLabel, 5);
- place(0, 6, mParticleFontLabel, 5);
- place(0, 7, mHelpFontLabel, 5);
- place(0, 8, mSecureFontLabel, 5);
- place(0, 9, mNpcFontLabel, 5);
- place(0, 10, mJapanFontLabel, 5);
- place(0, 11, mChinaFontLabel, 5);
+ place(0, 0, mThemeLabel, 5, 1);
+ place(0, 1, mLangLabel, 5, 1);
+ place(0, 2, mFontSizeLabel, 5, 1);
+ place(0, 3, mNpcFontSizeLabel, 5, 1);
+ place(0, 4, mFontLabel, 5, 1);
+ place(0, 5, mBoldFontLabel, 5, 1);
+ place(0, 6, mParticleFontLabel, 5, 1);
+ place(0, 7, mHelpFontLabel, 5, 1);
+ place(0, 8, mSecureFontLabel, 5, 1);
+ place(0, 9, mNpcFontLabel, 5, 1);
+ place(0, 10, mJapanFontLabel, 5, 1);
+ place(0, 11, mChinaFontLabel, 5, 1);
- place(6, 0, mThemeDropDown, 10);
- place(6, 1, mLangDropDown, 10);
- place(6, 2, mFontSizeDropDown, 10);
- place(6, 3, mNpcFontSizeDropDown, 10);
- place(6, 4, mFontDropDown, 10);
- place(6, 5, mBoldFontDropDown, 10);
- place(6, 6, mParticleFontDropDown, 10);
- place(6, 7, mHelpFontDropDown, 10);
- place(6, 8, mSecureFontDropDown, 10);
- place(6, 9, mNpcFontDropDown, 10);
- place(6, 10, mJapanFontDropDown, 10);
- place(6, 11, mChinaFontDropDown, 10);
+ place(6, 0, mThemeDropDown, 10, 1);
+ place(6, 1, mLangDropDown, 10, 1);
+ place(6, 2, mFontSizeDropDown, 10, 1);
+ place(6, 3, mNpcFontSizeDropDown, 10, 1);
+ place(6, 4, mFontDropDown, 10, 1);
+ place(6, 5, mBoldFontDropDown, 10, 1);
+ place(6, 6, mParticleFontDropDown, 10, 1);
+ place(6, 7, mHelpFontDropDown, 10, 1);
+ place(6, 8, mSecureFontDropDown, 10, 1);
+ place(6, 9, mNpcFontDropDown, 10, 1);
+ place(6, 10, mJapanFontDropDown, 10, 1);
+ place(6, 11, mChinaFontDropDown, 10, 1);
- place(17, 0, mInfoButton, 1);
+ place(17, 0, mInfoButton, 1, 1);
int size = mainGraphics->mWidth - 10;
const int maxWidth = mFontSize * 30 + 290;
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 17f74bf83..26e97b19a 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -169,27 +169,27 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
ContainerPlacer place = h.getPlacer(0, 0);
place(0, 0, scrollArea, 1, 5).setPadding(2);
- place(0, 5, mOpenGLDropDown, 1);
+ place(0, 5, mOpenGLDropDown, 1, 1);
- place(1, 0, mFsCheckBox, 2);
+ place(1, 0, mFsCheckBox, 2, 1);
- place(1, 1, mCustomCursorCheckBox, 3);
+ place(1, 1, mCustomCursorCheckBox, 3, 1);
- place(1, 2, mEnableResizeCheckBox, 2);
- place(1, 3, mNoFrameCheckBox, 2);
+ place(1, 2, mEnableResizeCheckBox, 2, 1);
+ place(1, 3, mNoFrameCheckBox, 2, 1);
#ifdef USE_SDL2
- place(1, 4, mAllowHighDPICheckBox, 2);
+ place(1, 4, mAllowHighDPICheckBox, 2, 1);
#endif // USE_SDL2
- place(0, 6, mFpsSlider);
- place(1, 6, mFpsCheckBox).setPadding(3);
- place(2, 6, mFpsLabel).setPadding(1);
+ place(0, 6, mFpsSlider, 1, 1);
+ place(1, 6, mFpsCheckBox, 1, 1).setPadding(3);
+ place(2, 6, mFpsLabel, 1, 1).setPadding(1);
- place(0, 7, mAltFpsSlider);
- place(1, 7, mAltFpsLabel).setPadding(3);
+ place(0, 7, mAltFpsSlider, 1, 1);
+ place(1, 7, mAltFpsLabel, 1, 1).setPadding(3);
#if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__)
- place(0, 8, mDetectButton);
+ place(0, 8, mDetectButton, 1, 1);
#else // !defined(ANDROID) && !defined(__APPLE__) &&
// !defined(__native_client__)
mNoFrameCheckBox->setEnabled(false);
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);