summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-25 06:12:48 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-25 06:12:48 +0300
commitf55baadfeb6245899497cd472f65f23e905481b9 (patch)
treed5d3dfa758d9d46cf91bc81e0190ee67c7bc48e7 /src/gui/widgets
parent52039744fa2e5e116548e5236cd8ba5f5d81702a (diff)
downloadmanaverse-f55baadfeb6245899497cd472f65f23e905481b9.tar.gz
manaverse-f55baadfeb6245899497cd472f65f23e905481b9.tar.bz2
manaverse-f55baadfeb6245899497cd472f65f23e905481b9.tar.xz
manaverse-f55baadfeb6245899497cd472f65f23e905481b9.zip
Remove default parameters from containerplacer.
Diffstat (limited to 'src/gui/widgets')
-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
12 files changed, 124 insertions, 124 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);