From a9a1ed080289185cc5e71a127d7fdf35c920de8a Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sat, 14 Mar 2009 22:03:30 -0600 Subject: Exposed a few more windows to the reset button on the setup window. These windows required an external declaration to reset. Signed-off-by: Ira Rice --- src/gui/buy.h | 2 ++ src/gui/chat.h | 12 ++++++------ src/gui/debugwindow.h | 2 ++ src/gui/sell.h | 2 ++ src/gui/setup.cpp | 36 +++++++++++++++++++++--------------- 5 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/gui/buy.h b/src/gui/buy.h index 9029fe9d..17ab6e19 100644 --- a/src/gui/buy.h +++ b/src/gui/buy.h @@ -117,4 +117,6 @@ class BuyDialog : public Window, public gcn::ActionListener, Uint32 mMaxItems; }; +extern BuyDialog *buyDialog; + #endif diff --git a/src/gui/chat.h b/src/gui/chat.h index 45d0c92f..28408b93 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -236,12 +236,12 @@ class ChatWindow : public Window, public gcn::ActionListener, typedef std::list History; typedef History::iterator HistoryIterator; History mHistory; /**< Command history */ - HistoryIterator mCurHist; /**< History iterator */ - Recorder *mRecorder; /**< Recording class */ - char mPartyPrefix; /**< Messages beginning with the prefix are sent to - the party */ - bool mReturnToggles; /**< Marks whether toggles the chat log - or not */ + HistoryIterator mCurHist; /**< History iterator */ + Recorder *mRecorder; /**< Recording class */ + char mPartyPrefix; /**< Messages beginning with the prefix are + sent to the party */ + bool mReturnToggles; /**< Marks whether toggles the chat + log or not */ Party *mParty; }; extern ChatWindow *chatWindow; diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h index 95e8b5e4..c82521f9 100644 --- a/src/gui/debugwindow.h +++ b/src/gui/debugwindow.h @@ -51,4 +51,6 @@ class DebugWindow : public Window gcn::Label *mParticleCountLabel; }; +extern DebugWindow *debugWindow; + #endif diff --git a/src/gui/sell.h b/src/gui/sell.h index 3776477f..5fb94c4e 100644 --- a/src/gui/sell.h +++ b/src/gui/sell.h @@ -108,4 +108,6 @@ class SellDialog : public Window, gcn::ActionListener, gcn::SelectionListener int mAmountItems; }; +extern SellDialog *sellDialog; + #endif diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 5fe35a6c..ab0b2245 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -35,18 +35,21 @@ #include "../utils/gettext.h" extern Window *chatWindow; -extern Window *equipmentWindow; -extern Window *helpWindow; -extern Window *inventoryWindow; -extern Window *minimap; -extern Window *skillDialog; extern Window *statusWindow; -extern Window *itemShortcutWindow; -extern Window *emoteShortcutWindow; +extern Window *buyDialog; +extern Window *sellDialog; +extern Window *inventoryWindow; extern Window *emoteWindow; -extern Window *tradeWindow; extern Window *npcTextDialog; extern Window *npcStringDialog; +extern Window *skillDialog; +extern Window *minimap; +extern Window *equipmentWindow; +extern Window *tradeWindow; +extern Window *helpWindow; +extern Window *debugWindow; +extern Window *itemShortcutWindow; +extern Window *emoteShortcutWindow; extern Window *storageWindow; Setup::Setup(): @@ -131,19 +134,22 @@ void Setup::action(const gcn::ActionEvent &event) if (!statusWindow) return; - statusWindow->resetToDefaultSize(); - minimap->resetToDefaultSize(); chatWindow->resetToDefaultSize(); + statusWindow->resetToDefaultSize(); + buyDialog->resetToDefaultSize(); + sellDialog->resetToDefaultSize(); inventoryWindow->resetToDefaultSize(); + emoteWindow->resetToDefaultSize(); + npcTextDialog->resetToDefaultSize(); + npcStringDialog->resetToDefaultSize(); + skillDialog->resetToDefaultSize(); + minimap->resetToDefaultSize(); equipmentWindow->resetToDefaultSize(); + tradeWindow->resetToDefaultSize(); helpWindow->resetToDefaultSize(); - skillDialog->resetToDefaultSize(); + debugWindow->resetToDefaultSize(); itemShortcutWindow->resetToDefaultSize(); emoteShortcutWindow->resetToDefaultSize(); - emoteWindow->resetToDefaultSize(); - tradeWindow->resetToDefaultSize(); - npcTextDialog->resetToDefaultSize(); - npcStringDialog->resetToDefaultSize(); storageWindow->resetToDefaultSize(); } } -- cgit v1.2.3-70-g09d2