summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-27 20:23:48 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-27 20:23:48 +0000
commit97bbe57e21a28544646da087e2a522390bf2ce5c (patch)
treea1899345f3b3928b3b0747b2429a45d08f79ae59 /src/gui/char_select.cpp
parentee15a808a1e0d36167f80d9f96147103ba5583de (diff)
downloadMana-97bbe57e21a28544646da087e2a522390bf2ce5c.tar.gz
Mana-97bbe57e21a28544646da087e2a522390bf2ce5c.tar.bz2
Mana-97bbe57e21a28544646da087e2a522390bf2ce5c.tar.xz
Mana-97bbe57e21a28544646da087e2a522390bf2ce5c.zip
Improved layout handler to support trees of nested arrays. Needed for converting and fixing the trade window.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index f7042c70..c2306880 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -100,9 +100,11 @@ CharSelectDialog::CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
mNameLabel = new gcn::Label(strprintf(_("Name: %s"), ""));
mLevelLabel = new gcn::Label(strprintf(_("Level: %d"), 0));
mMoneyLabel = new gcn::Label(strprintf(_("Money: %d"), 0));
- mPlayerBox = new PlayerBox();
+ mPlayerBox = new PlayerBox;
+ mPlayerBox->setWidth(74);
- Layout &layout = getLayout();
+ ContainerPlacer place;
+ place = getPlacer(0, 0);
place(0, 0, mPlayerBox, 1, 5).setPadding(3);
place(1, 0, mNameLabel, 3);
place(1, 1, mLevelLabel, 3);
@@ -111,18 +113,12 @@ CharSelectDialog::CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
place(2, 3, mNextButton);
place(1, 4, mNewCharButton);
place(2, 4, mDelCharButton);
- layout.setWidth(250);
- layout.setColWidth(0, 80);
- layout.setColWidth(3, Layout::FILL);
- layout.matchColWidth(1, 2);
- layout.setRowHeight(5, 5);
- layout.flush();
+ place.getCell().matchColWidth(1, 2);
+ place = getPlacer(0, 1);
place(0, 0, mUnRegisterButton);
place(2, 0, mSelectButton);
place(3, 0, mCancelButton);
- layout.setColWidth(1, Layout::FILL);
- reflowLayout();
- forgetLayout();
+ reflowLayout(250, 0);
setLocationRelativeTo(getParent());
setVisible(true);