summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-06 16:04:39 -0700
committerIra Rice <irarice@gmail.com>2009-01-06 16:04:39 -0700
commitc9b6f0a5f7b0bb38ed5c052c92e0f4cf474e1fc0 (patch)
tree0f381d867ac304fcd27362dd8baae35db6bc6bc5 /src/gui/char_select.cpp
parentb57cc8e3e29cb7c1004fdbd041173fcd4a2c1782 (diff)
downloadmana-c9b6f0a5f7b0bb38ed5c052c92e0f4cf474e1fc0.tar.gz
mana-c9b6f0a5f7b0bb38ed5c052c92e0f4cf474e1fc0.tar.bz2
mana-c9b6f0a5f7b0bb38ed5c052c92e0f4cf474e1fc0.tar.xz
mana-c9b6f0a5f7b0bb38ed5c052c92e0f4cf474e1fc0.zip
Converted the character selection dialog to use the layout widget.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index c89dadcd..2d1dbf11 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -30,6 +30,8 @@
#include "playerbox.h"
#include "textfield.h"
+#include "widgets/layout.h"
+
#include "../game.h"
#include "../localplayer.h"
#include "../main.h"
@@ -114,17 +116,20 @@ CharSelectDialog::CharSelectDialog(Network *network,
mCancelButton->getX() - 5 - mSelectButton->getWidth(),
mNewCharButton->getY());
- add(mPlayerBox);
- add(mSelectButton);
- add(mCancelButton);
- add(mNewCharButton);
- add(mDelCharButton);
- add(mPreviousButton);
- add(mNextButton);
- add(mNameLabel);
- add(mLevelLabel);
- add(mJobLevelLabel);
- add(mMoneyLabel);
+ place(0, 0, mPlayerBox, 5).setPadding(3);
+ place(0, 1, mNameLabel, 2);
+ place(0, 2, mLevelLabel, 2);
+ place(0, 3, mJobLevelLabel, 2);
+ place(0, 4, mMoneyLabel, 2);
+ place(0, 5, mPreviousButton);
+ place(1, 5, mNextButton);
+ place(0, 6, mNewCharButton);
+ place(1, 6, mDelCharButton);
+ place(3, 6, mSelectButton);
+ place(4, 6, mCancelButton);
+
+ Layout &layout = getLayout();
+ layout.setRowHeight(0, Layout::AUTO_SET);
setLocationRelativeTo(getParent());
setVisible(true);