1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/openmw/mwgui/enchantingdialog.hpp

79 lines
2.1 KiB
C++
Raw Normal View History

#ifndef MWGUI_ENCHANTINGDIALOG_H
#define MWGUI_ENCHANTINGDIALOG_H
#include "spellcreationdialog.hpp"
#include "../mwbase/windowmanager.hpp"
2013-03-28 17:41:00 +01:00
#include "../mwmechanics/enchanting.hpp"
namespace MWGui
{
2013-03-16 19:00:14 +01:00
class ItemSelectionDialog;
class ItemWidget;
2013-03-16 19:00:14 +01:00
class EnchantingDialog : public WindowBase, public ReferenceInterface, public EffectEditorBase
{
public:
EnchantingDialog();
2013-03-16 19:00:14 +01:00
virtual ~EnchantingDialog();
void onOpen() override;
void onFrame(float dt) override { checkReferenceAvailable(); }
void clear() override { 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) override;
void resetReference() override;
protected:
void onReferenceUnavailable() override;
void notifyEffectsChanged() override;
2012-10-03 15:06:54 +02:00
void onCancelButtonClicked(MyGUI::Widget* sender);
2013-03-16 19:00:14 +01: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 17:41:00 +01:00
void onBuyButtonClicked(MyGUI::Widget* sender);
2013-03-16 19:00:14 +01:00
void updateLabels();
2013-03-28 17:41:00 +01:00
void onTypeButtonClicked(MyGUI::Widget* sender);
void onAccept(MyGUI::EditBox* sender);
2013-03-16 19:00:14 +01:00
ItemSelectionDialog* mItemSelectionDialog;
2012-10-03 15:06:54 +02:00
MyGUI::Widget* mChanceLayout;
2012-10-03 15:06:54 +02:00
MyGUI::Button* mCancelButton;
ItemWidget* mItemBox;
ItemWidget* mSoulBox;
2013-03-16 19:00:14 +01:00
MyGUI::Button* mTypeButton;
MyGUI::Button* mBuyButton;
MyGUI::EditBox* mName;
2013-03-16 19:00:14 +01:00
MyGUI::TextBox* mEnchantmentPoints;
MyGUI::TextBox* mCastCost;
MyGUI::TextBox* mCharge;
MyGUI::TextBox* mSuccessChance;
2013-03-16 19:00:14 +01:00
MyGUI::TextBox* mPrice;
2013-04-03 18:02:30 +02:00
MyGUI::TextBox* mPriceText;
2013-03-16 19:00:14 +01:00
2013-03-28 17:41:00 +01:00
MWMechanics::Enchanting mEnchanting;
ESM::EffectList mEffectList;
};
}
#endif