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:
		
							parent
							
								
									0ac0c62091
								
							
						
					
					
						commit
						15a525676c
					
				
					 1 changed files with 763 additions and 758 deletions
				
			
		|  | @ -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(); | ||||
|     }     | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue