1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-31 19:26:38 +00:00

Replace spellcreationdialog.cpp to add gold counter for player

This commit is contained in:
Garrett 2025-04-02 10:38:53 +00:00 committed by SkyHasACat
parent 0ac0c62091
commit 15a525676c

View file

@ -352,6 +352,7 @@ namespace MWGui
getWidget(mAvailableEffectsList, "AvailableEffects");
getWidget(mUsedEffectsView, "UsedEffects");
getWidget(mPriceLabel, "PriceLabel");
getWidget(mPlayerGold, "PlayerGold");
getWidget(mBuyButton, "BuyButton");
getWidget(mCancelButton, "CancelButton");
@ -370,6 +371,10 @@ 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();
}