Stat labels no longer cause funny newline wrapping. Release Build 7170.
This commit is contained in:
		
							parent
							
								
									48ba282fa5
								
							
						
					
					
						commit
						29005e366c
					
				| @ -105,7 +105,7 @@ void Menu::InitializeCharacterMenuWindow(){ | ||||
| 	equipSelectionSelectButton->Disable(); | ||||
| 
 | ||||
| 	const static auto GetLabelText=[](ItemAttribute attribute){ | ||||
| 		std::string attrStr=std::string(attribute.Name())+":\n  "; | ||||
| 		std::string attrStr=std::string(attribute.Name())+"\n  "; | ||||
| 		attrStr+=std::to_string(game->GetPlayer()->GetStat(attribute)); | ||||
| 		if(attribute.DisplayAsPercent()){ | ||||
| 			attrStr+="%"; | ||||
| @ -297,7 +297,7 @@ void Menu::InitializeCharacterMenuWindow(){ | ||||
| 	int yOffset=0; | ||||
| 	for(const std::string&attribute:displayAttrs){ | ||||
| 		std::string attrStr=GetLabelText(ItemAttribute::Get(attribute)); | ||||
| 		auto attrLabel=characterMenuWindow->ADD("Attribute "+std::string(ItemAttribute::Get(attribute).Name())+" Label",StatLabel)(geom2d::rect<float>{{245,28+2+float(yOffset)},{62,18}},ItemAttribute::Get(attribute),1,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END; | ||||
| 		auto attrLabel=characterMenuWindow->ADD("Attribute "+std::string(ItemAttribute::Get(attribute).Name())+" Label",StatLabel)(geom2d::rect<float>{{245,28+2+float(yOffset)},{62,18}},ItemAttribute::Get(attribute),1,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN|ComponentAttr::FIT_TO_LABEL)END; | ||||
| 		Menu::AddEquipStatListener(attrLabel); | ||||
| 		yOffset+=20; | ||||
| 	} | ||||
|  | ||||
| @ -72,7 +72,7 @@ protected: | ||||
|         SetValue(game->GetPlayer()->GetStat(stat)); | ||||
|     } | ||||
|     inline void UpdateLabel(){ | ||||
|         std::string attrStr=std::string(stat.Name())+":\n  "; | ||||
|         std::string attrStr=std::string(stat.Name())+"\n  "; | ||||
| 		attrStr+=std::to_string(value); | ||||
| 		if(stat.DisplayAsPercent()){ | ||||
| 			attrStr+="%"; | ||||
|  | ||||
| @ -39,7 +39,7 @@ All rights reserved. | ||||
| #define VERSION_MAJOR 0 | ||||
| #define VERSION_MINOR 3 | ||||
| #define VERSION_PATCH 0 | ||||
| #define VERSION_BUILD 7167 | ||||
| #define VERSION_BUILD 7170 | ||||
| 
 | ||||
| #define stringify(a) stringify_(a) | ||||
| #define stringify_(a) #a | ||||
|  | ||||
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user