diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-05 14:37:13 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-05 14:37:13 +0000 |
commit | 9978e58ee7d9a15814b939fa8dd42254e16702b2 (patch) | |
tree | d2819558b081767fb7ed27bf2de1a991a343766c /src/gui | |
parent | 20811a8b13a5425bcc956a380f7e8d4878eb5c9d (diff) | |
download | mana-client-9978e58ee7d9a15814b939fa8dd42254e16702b2.tar.gz mana-client-9978e58ee7d9a15814b939fa8dd42254e16702b2.tar.bz2 mana-client-9978e58ee7d9a15814b939fa8dd42254e16702b2.tar.xz mana-client-9978e58ee7d9a15814b939fa8dd42254e16702b2.zip |
Removed bugging cancel button from npc dialog and fixed npc sprites.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/npc.cpp | 24 | ||||
-rw-r--r-- | src/gui/npc_text.cpp | 7 |
2 files changed, 20 insertions, 11 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(); } + */ } diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp index dc70927c..f86f45e9 100644 --- a/src/gui/npc_text.cpp +++ b/src/gui/npc_text.cpp @@ -36,8 +36,11 @@ NpcTextDialog::NpcTextDialog(gcn::Container *parent): okButton = new Button("OK"); setSize(260, 175); - scrollArea->setDimension(gcn::Rectangle(5, 5, 250, 130)); - okButton->setPosition(260 - 10 - okButton->getWidth(), 145); + scrollArea->setDimension(gcn::Rectangle( + 5, 5, 250, 160 - okButton->getHeight())); + okButton->setPosition( + 260 - 5 - okButton->getWidth(), + 175 - 5 - okButton->getHeight()); okButton->setEventId("ok"); okButton->addActionListener(this); |