2012-09-27 06:47:47 +00:00
|
|
|
#include "enchantingdialog.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
EnchantingDialog::EnchantingDialog(MWBase::WindowManager &parWindowManager)
|
|
|
|
: WindowBase("openmw_enchanting_dialog.layout", parWindowManager)
|
|
|
|
{
|
2012-10-03 13:06:54 +00:00
|
|
|
getWidget(mCancelButton, "CancelButton");
|
2012-09-27 06:47:47 +00:00
|
|
|
|
2012-10-03 13:06:54 +00:00
|
|
|
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &EnchantingDialog::onCancelButtonClicked);
|
2012-09-27 06:47:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void EnchantingDialog::open()
|
|
|
|
{
|
|
|
|
center();
|
|
|
|
}
|
|
|
|
|
|
|
|
void EnchantingDialog::startEnchanting (MWWorld::Ptr actor)
|
|
|
|
{
|
|
|
|
mPtr = actor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void EnchantingDialog::onReferenceUnavailable ()
|
|
|
|
{
|
|
|
|
mWindowManager.removeGuiMode (GM_Dialogue);
|
|
|
|
mWindowManager.removeGuiMode (GM_Enchanting);
|
|
|
|
}
|
|
|
|
|
2012-10-03 13:06:54 +00:00
|
|
|
void EnchantingDialog::onCancelButtonClicked(MyGUI::Widget* sender)
|
|
|
|
{
|
|
|
|
mWindowManager.removeGuiMode (GM_Enchanting);
|
|
|
|
}
|
2012-09-27 06:47:47 +00:00
|
|
|
}
|