OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
quickkeysmenu.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_QUICKKEYS_H
2 #define MWGUI_QUICKKEYS_H
3 
4 #include "../mwworld/ptr.hpp"
5 
6 #include "windowbase.hpp"
7 
8 #include "spellmodel.hpp"
9 
10 namespace MWGui
11 {
12 
13  class QuickKeysMenuAssign;
14  class ItemSelectionDialog;
15  class MagicSelectionDialog;
16  class ItemWidget;
17  class SpellView;
18 
19  class QuickKeysMenu : public WindowBase
20  {
21  public:
22  QuickKeysMenu();
24 
25  virtual void exit();
26 
27  void onItemButtonClicked(MyGUI::Widget* sender);
28  void onMagicButtonClicked(MyGUI::Widget* sender);
29  void onUnassignButtonClicked(MyGUI::Widget* sender);
30  void onCancelButtonClicked(MyGUI::Widget* sender);
31 
32  void onAssignItem (MWWorld::Ptr item);
33  void onAssignItemCancel ();
34  void onAssignMagicItem (MWWorld::Ptr item);
35  void onAssignMagic (const std::string& spellId);
36  void onAssignMagicCancel ();
37 
38  void activateQuickKey(int index);
39 
42  {
48  };
49 
50  void write (ESM::ESMWriter& writer);
51  void readRecord (ESM::ESMReader& reader, uint32_t type);
52  void clear();
53 
54 
55  private:
56  MyGUI::EditBox* mInstructionLabel;
57  MyGUI::Button* mOkButton;
58 
59  std::vector<ItemWidget*> mQuickKeyButtons;
60  std::vector<QuickKeyType> mAssigned;
61 
65 
67 
68 
69  void onQuickKeyButtonClicked(MyGUI::Widget* sender);
70  void onOkButtonClicked(MyGUI::Widget* sender);
71 
72  void unassign(ItemWidget* key, int index);
73  };
74 
76  {
77  public:
79  virtual void exit();
80 
81  private:
82  MyGUI::TextBox* mLabel;
83  MyGUI::Button* mItemButton;
84  MyGUI::Button* mMagicButton;
85  MyGUI::Button* mUnassignButton;
86  MyGUI::Button* mCancelButton;
87 
89  };
90 
92  {
93  public:
95 
96  virtual void open();
97  virtual void exit();
98 
99  private:
100  MyGUI::Button* mCancelButton;
102 
104 
105  void onCancelButtonClicked (MyGUI::Widget* sender);
107  };
108 }
109 
110 
111 #endif
MyGUI::Button * mCancelButton
Definition: quickkeysmenu.hpp:86
void activateQuickKey(int index)
Definition: quickkeysmenu.cpp:257
virtual void open()
Notify that window has been made visible.
Definition: quickkeysmenu.cpp:542
MagicSelectionDialog * mMagicSelectionDialog
Definition: quickkeysmenu.hpp:64
void onItemButtonClicked(MyGUI::Widget *sender)
Definition: quickkeysmenu.cpp:140
Definition: quickkeysmenu.hpp:19
Definition: esmreader.hpp:21
void onCancelButtonClicked(MyGUI::Widget *sender)
Definition: quickkeysmenu.cpp:532
QuickKeysMenu()
Definition: quickkeysmenu.cpp:33
void onOkButtonClicked(MyGUI::Widget *sender)
Definition: quickkeysmenu.cpp:134
Definition: quickkeysmenu.hpp:91
MyGUI::TextBox * mLabel
Definition: quickkeysmenu.hpp:82
Definition: itemselection.hpp:19
void onAssignItemCancel()
Definition: quickkeysmenu.cpp:194
void onCancelButtonClicked(MyGUI::Widget *sender)
Definition: quickkeysmenu.cpp:172
virtual void exit()
Gracefully exits the window.
Definition: quickkeysmenu.cpp:537
std::vector< QuickKeyType > mAssigned
Definition: quickkeysmenu.hpp:60
void readRecord(ESM::ESMReader &reader, uint32_t type)
Definition: quickkeysmenu.cpp:447
void onAssignMagic(const std::string &spellId)
Definition: quickkeysmenu.cpp:218
MyGUI::EditBox * mInstructionLabel
Definition: quickkeysmenu.hpp:56
Definition: esmwriter.hpp:17
QuickKeysMenu * mParent
Definition: quickkeysmenu.hpp:88
QuickKeysMenuAssign(QuickKeysMenu *parent)
Definition: quickkeysmenu.cpp:357
Definition: quickkeysmenu.hpp:46
void onAssignItem(MWWorld::Ptr item)
Definition: quickkeysmenu.cpp:177
int mSelectedIndex
Definition: quickkeysmenu.hpp:66
std::vector< ItemWidget * > mQuickKeyButtons
Definition: quickkeysmenu.hpp:59
MyGUI::Button * mCancelButton
Definition: quickkeysmenu.hpp:100
MyGUI::Button * mOkButton
Definition: quickkeysmenu.hpp:57
void onModelIndexSelected(SpellModel::ModelIndex index)
Definition: quickkeysmenu.cpp:550
Displays a SpellModel in a list widget.
Definition: spellview.hpp:21
void onQuickKeyButtonClicked(MyGUI::Widget *sender)
Definition: quickkeysmenu.cpp:112
MyGUI::Button * mMagicButton
Definition: quickkeysmenu.hpp:84
~QuickKeysMenu()
Definition: quickkeysmenu.cpp:78
Definition: quickkeysmenu.hpp:47
void unassign(ItemWidget *key, int index)
Definition: quickkeysmenu.cpp:85
Definition: quickkeysmenu.hpp:45
MyGUI::Button * mUnassignButton
Definition: quickkeysmenu.hpp:85
MagicSelectionDialog(QuickKeysMenu *parent)
Definition: quickkeysmenu.cpp:517
void write(ESM::ESMWriter &writer)
Definition: quickkeysmenu.cpp:406
MyGUI::Button * mItemButton
Definition: quickkeysmenu.hpp:83
ItemSelectionDialog * mItemSelectionDialog
Definition: quickkeysmenu.hpp:63
Definition: windowbase.hpp:16
QuickKeyType
Definition: quickkeysmenu.hpp:41
virtual void exit()
Gracefully exits the window.
Definition: quickkeysmenu.cpp:401
void onAssignMagicCancel()
Definition: quickkeysmenu.cpp:252
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
Definition: quickkeysmenu.hpp:43
QuickKeysMenu * mParent
Definition: quickkeysmenu.hpp:103
SpellView * mMagicList
Definition: quickkeysmenu.hpp:101
virtual void exit()
Gracefully exits the window.
Definition: quickkeysmenu.cpp:65
void onUnassignButtonClicked(MyGUI::Widget *sender)
Definition: quickkeysmenu.cpp:166
void onAssignMagicItem(MWWorld::Ptr item)
Definition: quickkeysmenu.cpp:199
Definition: quickkeysmenu.hpp:75
QuickKeysMenuAssign * mAssignDialog
Definition: quickkeysmenu.hpp:62
void clear()
Definition: quickkeysmenu.cpp:70
void onMagicButtonClicked(MyGUI::Widget *sender)
Definition: quickkeysmenu.cpp:155
A widget that shows an icon for an MWWorld::Ptr.
Definition: itemwidget.hpp:15
Definition: quickkeysmenu.hpp:44
Definition: windowbase.hpp:41