summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-24 20:19:34 -0700
committerJared Adams <jaxad0127@gmail.com>2009-02-24 20:19:34 -0700
commitb32ee882097905faea84ed73aa86620248fdefae (patch)
treeb7d038070911002bc2a11baf4427323f0c83647e /src
parent9759b0bd0a4777c5645c695c119b4716e251add1 (diff)
downloadmana-client-b32ee882097905faea84ed73aa86620248fdefae.tar.gz
mana-client-b32ee882097905faea84ed73aa86620248fdefae.tar.bz2
mana-client-b32ee882097905faea84ed73aa86620248fdefae.tar.xz
mana-client-b32ee882097905faea84ed73aa86620248fdefae.zip
Small dialog visibility fix
Basically ensures that the NPC text dialog is visible before making NPC input dialogs visible
Diffstat (limited to 'src')
-rw-r--r--src/gui/npcintegerdialog.cpp7
-rw-r--r--src/gui/npcintegerdialog.h2
-rw-r--r--src/gui/npclistdialog.cpp7
-rw-r--r--src/gui/npclistdialog.h2
-rw-r--r--src/gui/npcstringdialog.cpp7
-rw-r--r--src/gui/npcstringdialog.h2
6 files changed, 27 insertions, 0 deletions
diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp
index 463f46ae..f91b42da 100644
--- a/src/gui/npcintegerdialog.cpp
+++ b/src/gui/npcintegerdialog.cpp
@@ -123,3 +123,10 @@ void NpcIntegerDialog::requestFocus()
{
mValueField->requestFocus();
}
+
+void NpcIntegerDialog::setVisible(bool visible)
+{
+ if (visible) npcTextDialog->setVisible(true);
+
+ Window::setVisible(visible);
+}
diff --git a/src/gui/npcintegerdialog.h b/src/gui/npcintegerdialog.h
index 941bb55a..6083338c 100644
--- a/src/gui/npcintegerdialog.h
+++ b/src/gui/npcintegerdialog.h
@@ -78,6 +78,8 @@ class NpcIntegerDialog : public Window, public gcn::ActionListener
*/
void requestFocus();
+ void setVisible(bool visible);
+
private:
gcn::Button *mDecButton;
gcn::Button *mIncButton;
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index c476999a..8349cb4a 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -118,3 +118,10 @@ void NpcListDialog::action(const gcn::ActionEvent &event)
current_npc->dialogChoice(choice);
}
}
+
+void NpcListDialog::setVisible(bool visible)
+{
+ if (visible) npcTextDialog->setVisible(true);
+
+ Window::setVisible(visible);
+}
diff --git a/src/gui/npclistdialog.h b/src/gui/npclistdialog.h
index 57d6247a..e7e2f9a9 100644
--- a/src/gui/npclistdialog.h
+++ b/src/gui/npclistdialog.h
@@ -72,6 +72,8 @@ class NpcListDialog : public Window, public gcn::ActionListener,
*/
void reset();
+ void setVisible(bool visible);
+
private:
gcn::ListBox *mItemList;
diff --git a/src/gui/npcstringdialog.cpp b/src/gui/npcstringdialog.cpp
index d9bf5682..679c93e5 100644
--- a/src/gui/npcstringdialog.cpp
+++ b/src/gui/npcstringdialog.cpp
@@ -87,3 +87,10 @@ void NpcStringDialog::requestFocus()
{
mValueField->requestFocus();
}
+
+void NpcStringDialog::setVisible(bool visible)
+{
+ if (visible) npcTextDialog->setVisible(true);
+
+ Window::setVisible(visible);
+}
diff --git a/src/gui/npcstringdialog.h b/src/gui/npcstringdialog.h
index 0faaf203..31f9c9a0 100644
--- a/src/gui/npcstringdialog.h
+++ b/src/gui/npcstringdialog.h
@@ -68,6 +68,8 @@ class NpcStringDialog : public Window, public gcn::ActionListener
*/
void requestFocus();
+ void setVisible(bool visible);
+
private:
gcn::TextField *mValueField;
std::string mDefault;