From bcb27fff6a5c966cc2a004dc09362137adea5d2b Mon Sep 17 00:00:00 2001 From: Garrett Date: Thu, 3 Apr 2025 01:45:28 +0000 Subject: [PATCH] Update 2 files - /apps/openmw/mwgui/spellcreationdialog.cpp - /apps/openmw/mwgui/spellcreationdialog.hpp --- apps/openmw/mwgui/spellcreationdialog.cpp | 16 ++++++++-------- apps/openmw/mwgui/spellcreationdialog.hpp | 8 +------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/apps/openmw/mwgui/spellcreationdialog.cpp b/apps/openmw/mwgui/spellcreationdialog.cpp index 86c46c61e3..884f2136cb 100644 --- a/apps/openmw/mwgui/spellcreationdialog.cpp +++ b/apps/openmw/mwgui/spellcreationdialog.cpp @@ -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() - .find(ESM::MagicEffect::indexToGmstString(effectId)) - ->mValue.getString()); + .getESMStore() + ->get() + .find(ESM::MagicEffect::indexToGmstString(effectId)) + ->mValue.getString()); mButtonMapping[i] = effectId; ++i; } diff --git a/apps/openmw/mwgui/spellcreationdialog.hpp b/apps/openmw/mwgui/spellcreationdialog.hpp index 0ffa875620..b3c6ac51be 100644 --- a/apps/openmw/mwgui/spellcreationdialog.hpp +++ b/apps/openmw/mwgui/spellcreationdialog.hpp @@ -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 mButtonMapping; // maps button ID to effect ID Gui::MWList* mAvailableEffectsList; MyGUI::ScrollView* mUsedEffectsView; - EditEffectDialog mAddEffectDialog; std::unique_ptr 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; };