1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 04:49:54 +00:00
openmw-tes3mp/apps/openmw/mwgui/enchantingdialog.hpp

79 lines
2 KiB
C++
Raw Normal View History

#ifndef MWGUI_ENCHANTINGDIALOG_H
#define MWGUI_ENCHANTINGDIALOG_H
#include "spellcreationdialog.hpp"
#include "../mwbase/windowmanager.hpp"
2013-03-28 16:41:00 +00:00
#include "../mwmechanics/enchanting.hpp"
namespace MWGui
{
2013-03-16 18:00:14 +00:00
class ItemSelectionDialog;
class ItemWidget;
2013-03-16 18:00:14 +00:00
class EnchantingDialog : public WindowBase, public ReferenceInterface, public EffectEditorBase
{
public:
EnchantingDialog();
2013-03-16 18:00:14 +00:00
virtual ~EnchantingDialog();
virtual void onOpen();
void onFrame(float dt) { checkReferenceAvailable(); }
2017-09-23 20:16:56 +00:00
void clear() { resetReference(); }
void setSoulGem (const MWWorld::Ptr& gem);
void setItem (const MWWorld::Ptr& item);
/// Actor Ptr: buy enchantment from this actor
/// Soulgem Ptr: player self-enchant
void setPtr(const MWWorld::Ptr& ptr);
virtual void resetReference();
protected:
virtual void onReferenceUnavailable();
2013-03-28 16:41:00 +00:00
virtual void notifyEffectsChanged ();
2012-10-03 13:06:54 +00:00
void onCancelButtonClicked(MyGUI::Widget* sender);
2013-03-16 18:00:14 +00:00
void onSelectItem (MyGUI::Widget* sender);
void onSelectSoul (MyGUI::Widget* sender);
void onItemSelected(MWWorld::Ptr item);
void onItemCancel();
void onSoulSelected(MWWorld::Ptr item);
void onSoulCancel();
2013-03-28 16:41:00 +00:00
void onBuyButtonClicked(MyGUI::Widget* sender);
2013-03-16 18:00:14 +00:00
void updateLabels();
2013-03-28 16:41:00 +00:00
void onTypeButtonClicked(MyGUI::Widget* sender);
void onAccept(MyGUI::EditBox* sender);
2013-03-16 18:00:14 +00:00
ItemSelectionDialog* mItemSelectionDialog;
2012-10-03 13:06:54 +00:00
MyGUI::Widget* mChanceLayout;
2012-10-03 13:06:54 +00:00
MyGUI::Button* mCancelButton;
ItemWidget* mItemBox;
ItemWidget* mSoulBox;
2013-03-16 18:00:14 +00:00
MyGUI::Button* mTypeButton;
MyGUI::Button* mBuyButton;
MyGUI::EditBox* mName;
2013-03-16 18:00:14 +00:00
MyGUI::TextBox* mEnchantmentPoints;
MyGUI::TextBox* mCastCost;
MyGUI::TextBox* mCharge;
MyGUI::TextBox* mSuccessChance;
2013-03-16 18:00:14 +00:00
MyGUI::TextBox* mPrice;
2013-04-03 16:02:30 +00:00
MyGUI::TextBox* mPriceText;
2013-03-16 18:00:14 +00:00
2013-03-28 16:41:00 +00:00
MWMechanics::Enchanting mEnchanting;
ESM::EffectList mEffectList;
};
}
#endif