|
|
@ -8,6 +8,7 @@
|
|
|
|
#include <MyGUI_ScrollView.h>
|
|
|
|
#include <MyGUI_ScrollView.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <components/widgets/list.hpp>
|
|
|
|
#include <components/widgets/list.hpp>
|
|
|
|
|
|
|
|
#include <components/settings/settings.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
@ -43,6 +44,8 @@ namespace MWGui
|
|
|
|
getWidget(mEnchantmentPoints, "Enchantment");
|
|
|
|
getWidget(mEnchantmentPoints, "Enchantment");
|
|
|
|
getWidget(mCastCost, "CastCost");
|
|
|
|
getWidget(mCastCost, "CastCost");
|
|
|
|
getWidget(mCharge, "Charge");
|
|
|
|
getWidget(mCharge, "Charge");
|
|
|
|
|
|
|
|
getWidget(mSuccessChance, "SuccessChance");
|
|
|
|
|
|
|
|
getWidget(mChanceLayout, "ChanceLayout");
|
|
|
|
getWidget(mTypeButton, "TypeButton");
|
|
|
|
getWidget(mTypeButton, "TypeButton");
|
|
|
|
getWidget(mBuyButton, "BuyButton");
|
|
|
|
getWidget(mBuyButton, "BuyButton");
|
|
|
|
getWidget(mPrice, "PriceLabel");
|
|
|
|
getWidget(mPrice, "PriceLabel");
|
|
|
@ -115,6 +118,9 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
mCharge->setCaption(MyGUI::utility::toString(mEnchanting.getGemCharge()));
|
|
|
|
mCharge->setCaption(MyGUI::utility::toString(mEnchanting.getGemCharge()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int successChance = int(mEnchanting.getEnchantChance());
|
|
|
|
|
|
|
|
mSuccessChance->setCaption(MyGUI::utility::toString(std::max(0, successChance)));
|
|
|
|
|
|
|
|
|
|
|
|
std::stringstream castCost;
|
|
|
|
std::stringstream castCost;
|
|
|
|
castCost << mEnchanting.getEffectiveCastCost();
|
|
|
|
castCost << mEnchanting.getEffectiveCastCost();
|
|
|
|
mCastCost->setCaption(castCost.str());
|
|
|
|
mCastCost->setCaption(castCost.str());
|
|
|
@ -144,11 +150,15 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
void EnchantingDialog::startEnchanting (MWWorld::Ptr actor)
|
|
|
|
void EnchantingDialog::startEnchanting (MWWorld::Ptr actor)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
mName->setCaption("");
|
|
|
|
|
|
|
|
|
|
|
|
mEnchanting.setSelfEnchanting(false);
|
|
|
|
mEnchanting.setSelfEnchanting(false);
|
|
|
|
mEnchanting.setEnchanter(actor);
|
|
|
|
mEnchanting.setEnchanter(actor);
|
|
|
|
|
|
|
|
|
|
|
|
mBuyButton->setCaptionWithReplacing("#{sBuy}");
|
|
|
|
mBuyButton->setCaptionWithReplacing("#{sBuy}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mChanceLayout->setVisible(false);
|
|
|
|
|
|
|
|
|
|
|
|
mPtr = actor;
|
|
|
|
mPtr = actor;
|
|
|
|
|
|
|
|
|
|
|
|
setSoulGem(MWWorld::Ptr());
|
|
|
|
setSoulGem(MWWorld::Ptr());
|
|
|
@ -162,6 +172,8 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
void EnchantingDialog::startSelfEnchanting(MWWorld::Ptr soulgem)
|
|
|
|
void EnchantingDialog::startSelfEnchanting(MWWorld::Ptr soulgem)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
mName->setCaption("");
|
|
|
|
|
|
|
|
|
|
|
|
MWWorld::Ptr player = MWMechanics::getPlayer();
|
|
|
|
MWWorld::Ptr player = MWMechanics::getPlayer();
|
|
|
|
|
|
|
|
|
|
|
|
mEnchanting.setSelfEnchanting(true);
|
|
|
|
mEnchanting.setSelfEnchanting(true);
|
|
|
@ -169,6 +181,10 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
|
|
mBuyButton->setCaptionWithReplacing("#{sCreate}");
|
|
|
|
mBuyButton->setCaptionWithReplacing("#{sCreate}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool enabled = Settings::Manager::getBool("show enchant chance","GUI");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mChanceLayout->setVisible(enabled);
|
|
|
|
|
|
|
|
|
|
|
|
mPtr = player;
|
|
|
|
mPtr = player;
|
|
|
|
startEditing();
|
|
|
|
startEditing();
|
|
|
|
|
|
|
|
|
|
|
|