Skip to content

Commit 2138631

Browse files
committed
Update the language for the table headers. "4%" ---> "4% chance"
-Also stop appending into a new empty row by reordering the logic for when we advance a cell.
1 parent 079a746 commit 2138631

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/item.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3898,11 +3898,12 @@ void item::armor_protection_info( std::vector<iteminfo> &info, const iteminfo_qu
38983898

38993899
if( display_median ) {
39003900
info.emplace_back( "SPECIAL_ARMOR_GRAPH",
3901-
string_format( "<bold>%s</bold>: <bad>%d%%</bad>, <color_c_yellow>Median</color>, <good>%d%%</good>",
3901+
string_format( "<bold>%s</bold>: <bad>%d%%</bad> chance, <color_c_yellow>Median</color> chance, <good>%d%%</good> chance",
39023902
_( "Protection" ), percent_worst, percent_best ) );
39033903
} else if( percent_worst > 0 ) {
39043904
info.emplace_back( "SPECIAL_ARMOR_GRAPH",
3905-
string_format( "<bold>%s</bold>: <bad>%d%%</bad>, <good>%d%%</good>", _( "Protection" ),
3905+
string_format( "<bold>%s</bold>: <bad>%d%%</bad> chance, <good>%d%%</good> chance",
3906+
_( "Protection" ),
39063907
percent_worst, percent_best ) );
39073908
} else {
39083909
info.emplace_back( "SPECIAL_ARMOR_GRAPH", string_format( "<bold>%s</bold>:", _( "Protection" ) ) );

src/output.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,17 +1317,14 @@ static void draw_armor_table( const std::vector<iteminfo> &vItemDisplay, const i
13171317
ImGui::TableSetColumnIndex( i );
13181318
cataimgui::draw_colored_text( chopped_up[i], c_unset );
13191319
}
1320-
// This advances us past the last column, which we just reiterated. Since there are no more columns, it increments to the next row. Easy, huh?
1321-
ImGui::TableNextColumn();
1322-
13231320

13241321
info_iter++;
13251322

13261323
while( info_iter != vItemDisplay.end() && info_iter->sType == "ARMOR" ) {
13271324
const std::vector<std::string> delimited_strings = delimit_armor_text( *info_iter );
13281325
for( const std::string &text : delimited_strings ) {
1329-
cataimgui::draw_colored_text( text, c_unset );
13301326
ImGui::TableNextColumn();
1327+
cataimgui::draw_colored_text( text, c_unset );
13311328
}
13321329
info_iter++;
13331330
}

0 commit comments

Comments
 (0)