Stat labels no longer cause funny newline wrapping. Release Build 7170.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user