summaryrefslogtreecommitdiff
path: root/src/gui/npc_text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npc_text.cpp')
-rw-r--r--src/gui/npc_text.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp
index b94e8aa4..ec8a4b6e 100644
--- a/src/gui/npc_text.cpp
+++ b/src/gui/npc_text.cpp
@@ -38,6 +38,7 @@ NpcTextDialog::NpcTextDialog(Network *network):
Window(_("NPC")), mNetwork(network)
{
setResizable(true);
+ setCloseButton(true);
setMinWidth(200);
setMinHeight(150);
@@ -103,6 +104,13 @@ void NpcTextDialog::nextDialog(int npcID)
outMsg.writeInt32(npcID);
}
+void NpcTextDialog::closeDialog(int npcID)
+{
+ MessageOut outMsg(mNetwork);
+ outMsg.writeInt16(CMSG_NPC_CLOSE);
+ outMsg.writeInt32(npcID);
+}
+
void NpcTextDialog::widgetResized(const gcn::Event &event)
{
Window::widgetResized(event);