summaryrefslogtreecommitdiff
path: root/src/gui/npclistdialog.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-20 22:47:48 -0700
committerIra Rice <irarice@gmail.com>2009-01-20 22:47:48 -0700
commit8b88dffb8222bb4c59d09e11c00b1046f93d51fe (patch)
treec8356ddf4e4c72734c5f33bab72c82ef82fc29fc /src/gui/npclistdialog.cpp
parentb0ff8cc281d7e7f8f3c2666d6bbe6424fec74f9c (diff)
downloadmana-client-8b88dffb8222bb4c59d09e11c00b1046f93d51fe.tar.gz
mana-client-8b88dffb8222bb4c59d09e11c00b1046f93d51fe.tar.bz2
mana-client-8b88dffb8222bb4c59d09e11c00b1046f93d51fe.tar.xz
mana-client-8b88dffb8222bb4c59d09e11c00b1046f93d51fe.zip
Reflowed inventory window to use layout code, as well as fixed the npc
list dialog to be more consistant with other windows. Also revised the skill window to default to being only as big as the number of skills listed. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/npclistdialog.cpp')
-rw-r--r--src/gui/npclistdialog.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index e18b2ae8..7ecd0a74 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -47,8 +47,8 @@ NpcListDialog::NpcListDialog():
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
place(0, 0, scrollArea, 5).setPadding(3);
- place(3, 1, cancelButton);
- place(4, 1, okButton);
+ place(3, 1, okButton);
+ place(4, 1, cancelButton);
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
@@ -81,24 +81,6 @@ void NpcListDialog::reset()
mItems.clear();
}
-void NpcListDialog::widgetResized(const gcn::Event &event)
-{
- Window::widgetResized(event);
-
- const gcn::Rectangle &area = getChildrenArea();
- const int width = area.width;
- const int height = area.height;
-
- scrollArea->setDimension(gcn::Rectangle(
- 5, 5, width - 10, height - 15 - okButton->getHeight()));
- cancelButton->setPosition(
- width - 5 - cancelButton->getWidth(),
- height - 5 - cancelButton->getHeight());
- okButton->setPosition(
- cancelButton->getX() - 5 - okButton->getWidth(),
- cancelButton->getY());
-}
-
void NpcListDialog::action(const gcn::ActionEvent &event)
{
int choice = 0;