OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
spellbuyingwindow.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_SpellBuyingWINDOW_H
2 #define MWGUI_SpellBuyingWINDOW_H
3 
4 #include "windowbase.hpp"
5 #include "referenceinterface.hpp"
6 
7 namespace MyGUI
8 {
9  class Gui;
10  class Widget;
11 }
12 
13 namespace MWGui
14 {
15  class WindowManager;
16 }
17 
18 
19 namespace MWGui
20 {
22  {
23  public:
25 
26  void startSpellBuying(const MWWorld::Ptr& actor);
27 
28  virtual void exit();
29 
30  protected:
31  MyGUI::Button* mCancelButton;
32  MyGUI::TextBox* mPlayerGold;
33 
34  MyGUI::ScrollView* mSpellsView;
35 
36  std::map<MyGUI::Widget*, std::string> mSpellsWidgetMap;
37 
38  void onCancelButtonClicked(MyGUI::Widget* _sender);
39  void onSpellButtonClick(MyGUI::Widget* _sender);
40  void onMouseWheel(MyGUI::Widget* _sender, int _rel);
41  void addSpell(const std::string& spellID);
42  void clearSpells();
44 
45  static const int sLineHeight;
46 
47  void updateLabels();
48 
49  virtual void onReferenceUnavailable();
50 
51  bool playerHasSpell (const std::string& id);
52  };
53 }
54 
55 #endif
void startSpellBuying(const MWWorld::Ptr &actor)
Definition: spellbuyingwindow.cpp:88
void clearSpells()
Definition: spellbuyingwindow.cpp:79
MyGUI::TextBox * mPlayerGold
Definition: spellbuyingwindow.hpp:32
std::map< MyGUI::Widget *, std::string > mSpellsWidgetMap
Definition: spellbuyingwindow.hpp:36
MyGUI::ScrollView * mSpellsView
Definition: spellbuyingwindow.hpp:34
void updateLabels()
Definition: spellbuyingwindow.cpp:159
void onSpellButtonClick(MyGUI::Widget *_sender)
Definition: spellbuyingwindow.cpp:132
SpellBuyingWindow()
Definition: spellbuyingwindow.cpp:24
bool playerHasSpell(const std::string &id)
Definition: spellbuyingwindow.cpp:126
static const int sLineHeight
Definition: spellbuyingwindow.hpp:45
MyGUI::Button * mCancelButton
Definition: spellbuyingwindow.hpp:31
void addSpell(const std::string &spellID)
Definition: spellbuyingwindow.cpp:43
void onMouseWheel(MyGUI::Widget *_sender, int _rel)
Definition: spellbuyingwindow.cpp:178
virtual void exit()
Gracefully exits the window.
Definition: spellbuyingwindow.cpp:38
Definition: windowbase.hpp:16
void onCancelButtonClicked(MyGUI::Widget *_sender)
Definition: spellbuyingwindow.cpp:154
int mCurrentY
Definition: spellbuyingwindow.hpp:43
int mLastPos
Definition: spellbuyingwindow.hpp:43
this class is intended for GUI interfaces that access an MW-Reference for example dialogue window acc...
Definition: referenceinterface.hpp:12
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual void onReferenceUnavailable()
called when reference has become unavailable
Definition: spellbuyingwindow.cpp:171
Definition: spellbuyingwindow.hpp:21