mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-01 09:56:39 +00:00
Replace spellcreationdialog.cpp to add gold counter for player
This commit is contained in:
parent
0ac0c62091
commit
15a525676c
1 changed files with 763 additions and 758 deletions
|
|
@ -352,6 +352,7 @@ namespace MWGui
|
||||||
getWidget(mAvailableEffectsList, "AvailableEffects");
|
getWidget(mAvailableEffectsList, "AvailableEffects");
|
||||||
getWidget(mUsedEffectsView, "UsedEffects");
|
getWidget(mUsedEffectsView, "UsedEffects");
|
||||||
getWidget(mPriceLabel, "PriceLabel");
|
getWidget(mPriceLabel, "PriceLabel");
|
||||||
|
getWidget(mPlayerGold, "PlayerGold");
|
||||||
getWidget(mBuyButton, "BuyButton");
|
getWidget(mBuyButton, "BuyButton");
|
||||||
getWidget(mCancelButton, "CancelButton");
|
getWidget(mCancelButton, "CancelButton");
|
||||||
|
|
||||||
|
|
@ -370,6 +371,10 @@ namespace MWGui
|
||||||
mPtr = actor;
|
mPtr = actor;
|
||||||
mNameEdit->setCaption({});
|
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();
|
startEditing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue