mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-13 10:43:06 +00:00
Update 2 files
- /apps/openmw/mwgui/spellcreationdialog.cpp - /apps/openmw/mwgui/spellcreationdialog.hpp
This commit is contained in:
parent
f8c8b9b433
commit
bcb27fff6a
2 changed files with 9 additions and 15 deletions
|
|
@ -83,7 +83,7 @@ namespace MWGui
|
|||
getWidget(mDurationBox, "DurationBox");
|
||||
getWidget(mAreaBox, "AreaBox");
|
||||
getWidget(mMagnitudeBox, "MagnitudeBox");
|
||||
|
||||
|
||||
mRangeButton->eventMouseButtonClick += MyGUI::newDelegate(this, &EditEffectDialog::onRangeButtonClicked);
|
||||
mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &EditEffectDialog::onOkButtonClicked);
|
||||
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &EditEffectDialog::onCancelButtonClicked);
|
||||
|
|
@ -370,13 +370,13 @@ namespace MWGui
|
|||
|
||||
mPtr = actor;
|
||||
mNameEdit->setCaption({});
|
||||
|
||||
|
||||
MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
||||
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + MyGUI::utility::toString(playerGold));
|
||||
|
||||
|
||||
startEditing();
|
||||
}
|
||||
}
|
||||
|
||||
void SpellCreationDialog::onCancelButtonClicked(MyGUI::Widget* sender)
|
||||
{
|
||||
|
|
@ -556,10 +556,10 @@ namespace MWGui
|
|||
for (const short effectId : knownEffects)
|
||||
{
|
||||
mAvailableEffectsList->addItem(MWBase::Environment::get()
|
||||
.getESMStore()
|
||||
->get<ESM::GameSetting>()
|
||||
.find(ESM::MagicEffect::indexToGmstString(effectId))
|
||||
->mValue.getString());
|
||||
.getESMStore()
|
||||
->get<ESM::GameSetting>()
|
||||
.find(ESM::MagicEffect::indexToGmstString(effectId))
|
||||
->mValue.getString());
|
||||
mButtonMapping[i] = effectId;
|
||||
++i;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ namespace MWGui
|
|||
MyGUI::Button* mCancelButton;
|
||||
MyGUI::Button* mOkButton;
|
||||
MyGUI::Button* mDeleteButton;
|
||||
|
||||
|
||||
MyGUI::Button* mRangeButton;
|
||||
|
||||
|
|
@ -107,14 +106,11 @@ namespace MWGui
|
|||
|
||||
void setConstantEffect(bool constant);
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
std::map<int, short> mButtonMapping; // maps button ID to effect ID
|
||||
|
||||
Gui::MWList* mAvailableEffectsList;
|
||||
MyGUI::ScrollView* mUsedEffectsView;
|
||||
|
||||
|
||||
EditEffectDialog mAddEffectDialog;
|
||||
std::unique_ptr<SelectAttributeDialog> mSelectAttributeDialog;
|
||||
|
|
@ -162,8 +158,6 @@ namespace MWGui
|
|||
|
||||
void setPtr(const MWWorld::Ptr& actor) override;
|
||||
|
||||
void updateLabels();
|
||||
|
||||
std::string_view getWindowIdForLua() const override { return "SpellCreationDialog"; }
|
||||
|
||||
protected:
|
||||
|
|
@ -182,7 +176,7 @@ namespace MWGui
|
|||
MyGUI::Button* mCancelButton;
|
||||
MyGUI::TextBox* mPriceLabel;
|
||||
MyGUI::TextBox* mPlayerGold;
|
||||
|
||||
|
||||
ESM::Spell mSpell;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue