OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
enchantingdialog.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_ENCHANTINGDIALOG_H
2 #define MWGUI_ENCHANTINGDIALOG_H
3 
5 
6 #include "../mwbase/windowmanager.hpp"
7 
8 #include "../mwmechanics/enchanting.hpp"
9 
10 namespace MWGui
11 {
12 
13  class ItemSelectionDialog;
14  class ItemWidget;
15 
17  {
18  public:
20  virtual ~EnchantingDialog();
21 
22  virtual void onOpen();
23 
24  void onFrame(float dt) { checkReferenceAvailable(); }
25  void clear() { resetReference(); }
26 
27  void setSoulGem (const MWWorld::Ptr& gem);
28  void setItem (const MWWorld::Ptr& item);
29 
32  void setPtr(const MWWorld::Ptr& ptr);
33 
34  virtual void resetReference();
35 
36  protected:
37  virtual void onReferenceUnavailable();
38  virtual void notifyEffectsChanged ();
39 
40  void onCancelButtonClicked(MyGUI::Widget* sender);
41  void onSelectItem (MyGUI::Widget* sender);
42  void onSelectSoul (MyGUI::Widget* sender);
43 
44  void onItemSelected(MWWorld::Ptr item);
45  void onItemCancel();
46  void onSoulSelected(MWWorld::Ptr item);
47  void onSoulCancel();
48  void onBuyButtonClicked(MyGUI::Widget* sender);
49  void updateLabels();
50  void onTypeButtonClicked(MyGUI::Widget* sender);
51  void onAccept(MyGUI::EditBox* sender);
52 
54 
55  MyGUI::Widget* mChanceLayout;
56 
57  MyGUI::Button* mCancelButton;
60 
61  MyGUI::Button* mTypeButton;
62  MyGUI::Button* mBuyButton;
63 
64  MyGUI::EditBox* mName;
65  MyGUI::TextBox* mEnchantmentPoints;
66  MyGUI::TextBox* mCastCost;
67  MyGUI::TextBox* mCharge;
68  MyGUI::TextBox* mSuccessChance;
69  MyGUI::TextBox* mPrice;
70  MyGUI::TextBox* mPriceText;
71 
74  };
75 
76 }
77 
78 #endif
void onCancelButtonClicked(MyGUI::Widget *sender)
Definition: enchantingdialog.cpp:191
MyGUI::TextBox * mPriceText
Definition: enchantingdialog.hpp:70
void onItemSelected(MWWorld::Ptr item)
Definition: enchantingdialog.cpp:215
void onSelectItem(MyGUI::Widget *sender)
Definition: enchantingdialog.cpp:196
void onSelectSoul(MyGUI::Widget *sender)
Definition: enchantingdialog.cpp:251
void onTypeButtonClicked(MyGUI::Widget *sender)
Definition: enchantingdialog.cpp:281
MyGUI::TextBox * mSuccessChance
Definition: enchantingdialog.hpp:68
ItemWidget * mItemBox
Definition: enchantingdialog.hpp:58
void setItem(const MWWorld::Ptr &item)
Definition: enchantingdialog.cpp:87
Definition: itemselection.hpp:19
void onBuyButtonClicked(MyGUI::Widget *sender)
Definition: enchantingdialog.cpp:296
EnchantingDialog()
Definition: enchantingdialog.cpp:28
void onItemCancel()
Definition: enchantingdialog.cpp:225
void setSoulGem(const MWWorld::Ptr &gem)
Definition: enchantingdialog.cpp:70
ESM::EffectList mEffectList
Definition: enchantingdialog.hpp:73
void onSoulSelected(MWWorld::Ptr item)
Definition: enchantingdialog.cpp:230
virtual void notifyEffectsChanged()
Definition: enchantingdialog.cpp:274
MyGUI::TextBox * mCastCost
Definition: enchantingdialog.hpp:66
MyGUI::Widget * mChanceLayout
Definition: enchantingdialog.hpp:55
void setPtr(const MWWorld::Ptr &ptr)
Definition: enchantingdialog.cpp:143
MWMechanics::Enchanting mEnchanting
Definition: enchantingdialog.hpp:72
Definition: enchantingdialog.hpp:16
Definition: enchanting.hpp:15
ItemWidget * mSoulBox
Definition: enchantingdialog.hpp:59
void checkReferenceAvailable()
closes the window, if the MW-reference has become unavailable
Definition: referenceinterface.cpp:13
Definition: windowbase.hpp:21
void updateLabels()
Definition: enchantingdialog.cpp:105
this class is intended for GUI interfaces that access an MW-Reference for example dialogue window acc...
Definition: referenceinterface.hpp:12
MyGUI::Button * mBuyButton
Definition: enchantingdialog.hpp:62
MyGUI::Button * mCancelButton
Definition: enchantingdialog.hpp:57
MyGUI::TextBox * mCharge
Definition: enchantingdialog.hpp:67
virtual void onReferenceUnavailable()
called when reference has become unavailable
Definition: enchantingdialog.cpp:176
void onFrame(float dt)
Called every frame if the window is in an active GUI mode.
Definition: enchantingdialog.hpp:24
virtual ~EnchantingDialog()
Definition: enchantingdialog.cpp:59
void clear()
Clear any state specific to the running game.
Definition: enchantingdialog.hpp:25
void onAccept(MyGUI::EditBox *sender)
Definition: enchantingdialog.cpp:288
void onSoulCancel()
Definition: enchantingdialog.cpp:246
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
MyGUI::Button * mTypeButton
Definition: enchantingdialog.hpp:61
virtual void resetReference()
Definition: enchantingdialog.cpp:182
ItemSelectionDialog * mItemSelectionDialog
Definition: enchantingdialog.hpp:53
Definition: spellcreationdialog.hpp:94
EffectList, ENAM subrecord.
Definition: effectlist.hpp:33
MyGUI::EditBox * mName
Definition: enchantingdialog.hpp:64
MyGUI::TextBox * mPrice
Definition: enchantingdialog.hpp:69
A widget that shows an icon for an MWWorld::Ptr.
Definition: itemwidget.hpp:15
MyGUI::TextBox * mEnchantmentPoints
Definition: enchantingdialog.hpp:65
virtual void onOpen()
Notify that window has been made visible.
Definition: enchantingdialog.cpp:64