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