diff options
author | Ira Rice <irarice@gmail.com> | 2009-03-10 08:11:48 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-10 08:11:48 -0600 |
commit | 443a10db52e909c4c2a33543795ec8837547e973 (patch) | |
tree | fc8fff5e1dbd5e171974919186f6356ffce7b6ff /src/gui/npc_text.cpp | |
parent | 03507766fa4ee07491b7ee702093669de6222c9c (diff) | |
download | mana-443a10db52e909c4c2a33543795ec8837547e973.tar.gz mana-443a10db52e909c4c2a33543795ec8837547e973.tar.bz2 mana-443a10db52e909c4c2a33543795ec8837547e973.tar.xz mana-443a10db52e909c4c2a33543795ec8837547e973.zip |
Made it so that when windows load previous states, they are never
smaller than the minimum width and height (a check that should have
been enforced in the first place), as well as modified the NPC list and
text dialogs to remember where they were when they were moved or resized
last.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/npc_text.cpp')
-rw-r--r-- | src/gui/npc_text.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp index ec8a4b6e..58aa0c5e 100644 --- a/src/gui/npc_text.cpp +++ b/src/gui/npc_text.cpp @@ -35,10 +35,10 @@ #include "../utils/gettext.h" NpcTextDialog::NpcTextDialog(Network *network): - Window(_("NPC")), mNetwork(network) + Window("NPC"), mNetwork(network) { + setWindowName(_("NPC")); setResizable(true); - setCloseButton(true); setMinWidth(200); setMinHeight(150); @@ -89,6 +89,7 @@ void NpcTextDialog::action(const gcn::ActionEvent &event) { clearText(); setVisible(false); + saveWindowState(); if (current_npc) nextDialog(); @@ -118,3 +119,9 @@ void NpcTextDialog::widgetResized(const gcn::Event &event) setText(mText); } +void NpcTextDialog::requestFocus() +{ + loadWindowState(); + setVisible(true); +} + |