summaryrefslogtreecommitdiff
path: root/src/gui/npc.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-05 14:37:13 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-05 14:37:13 +0000
commit9978e58ee7d9a15814b939fa8dd42254e16702b2 (patch)
treed2819558b081767fb7ed27bf2de1a991a343766c /src/gui/npc.cpp
parent20811a8b13a5425bcc956a380f7e8d4878eb5c9d (diff)
downloadmana-9978e58ee7d9a15814b939fa8dd42254e16702b2.tar.gz
mana-9978e58ee7d9a15814b939fa8dd42254e16702b2.tar.bz2
mana-9978e58ee7d9a15814b939fa8dd42254e16702b2.tar.xz
mana-9978e58ee7d9a15814b939fa8dd42254e16702b2.zip
Removed bugging cancel button from npc dialog and fixed npc sprites.
Diffstat (limited to 'src/gui/npc.cpp')
-rw-r--r--src/gui/npc.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/gui/npc.cpp b/src/gui/npc.cpp
index 95180356..fbb55d65 100644
--- a/src/gui/npc.cpp
+++ b/src/gui/npc.cpp
@@ -33,24 +33,27 @@ NpcListDialog::NpcListDialog(gcn::Container *parent):
itemList = new ListBox(this);
scrollArea = new ScrollArea(itemList);
okButton = new Button("OK");
- cancelButton = new Button("Cancel");
+ //cancelButton = new Button("Cancel");
setSize(260, 175);
- scrollArea->setDimension(gcn::Rectangle(5, 5, 250, 130));
- okButton->setPosition(180, 145);
- cancelButton->setPosition(208, 145);
+ scrollArea->setDimension(gcn::Rectangle(
+ 5, 5, 250, 160 - okButton->getHeight()));
+ okButton->setPosition(
+ 260 - 5 - okButton->getWidth(),
+ 175 - 5 - okButton->getHeight());
+ //cancelButton->setPosition(208, 145);
itemList->setEventId("item");
okButton->setEventId("ok");
- cancelButton->setEventId("cancel");
+ //cancelButton->setEventId("cancel");
itemList->addActionListener(this);
okButton->addActionListener(this);
- cancelButton->addActionListener(this);
+ //cancelButton->addActionListener(this);
add(scrollArea);
add(okButton);
- add(cancelButton);
+ //add(cancelButton);
setLocationRelativeTo(getParent());
}
@@ -58,7 +61,7 @@ NpcListDialog::NpcListDialog(gcn::Container *parent):
NpcListDialog::~NpcListDialog()
{
delete okButton;
- delete cancelButton;
+ //delete cancelButton;
delete itemList;
delete scrollArea;
}
@@ -105,8 +108,11 @@ void NpcListDialog::action(const std::string& eventId)
setVisible(false);
reset();
}
- } else if (eventId == "cancel") {
+ }
+ /*
+ else if (eventId == "cancel") {
setVisible(false);
reset();
}
+ */
}