1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-08 20:16:43 +00:00

Update file enchantingdialog.cpp

This commit is contained in:
Garrett 2025-04-05 02:37:31 +00:00 committed by SkyHasACat
parent 57f8355bac
commit 7f11579d39

View file

@ -50,7 +50,7 @@ namespace MWGui
getWidget(mBuyButton, "BuyButton");
getWidget(mPrice, "PriceLabel");
getWidget(mPriceText, "PriceTextLabel");
getWidget(mPlayerGold, "PlayerGold");
setWidgets(mAvailableEffectsList, mUsedEffectsView);
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &EnchantingDialog::onCancelButtonClicked);
@ -65,6 +65,10 @@ namespace MWGui
{
center();
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mName);
MWWorld::Ptr player = MWMechanics::getPlayer();
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
mPlayerGold->setCaptionWithReplacing(MyGUI::utility::toString(playerGold));
}
void EnchantingDialog::setSoulGem(const MWWorld::Ptr& gem)