Skip to content

Commit 9dd8f87

Browse files
committed
Update the row-wrapping AGAIN
Sometimes the acid/environmental protection is present and always comes as a 2-column entry regardless of how many columns we normally have. So we need to account for that.
1 parent 749774d commit 9dd8f87

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/output.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,8 @@ static void draw_armor_table( const std::vector<iteminfo> &vItemDisplay, const i
13131313
ImGui::TableSetupColumn( invisible_ID_label.c_str(), ImGuiTableColumnFlags_WidthStretch );
13141314
}
13151315
ImGui::TableHeadersRow();
1316+
// After putting in the invisible labels in the last for-loop, this writes the actual text. Just the same text without the ## marker, and
1317+
// with our native functions doing the drawing. (So we parse color tags)
13161318
for( size_t i = 0; i < chopped_up.size(); i++ ) {
13171319
ImGui::TableSetColumnIndex( i );
13181320
cataimgui::draw_colored_text( chopped_up[i], c_unset );
@@ -1321,6 +1323,7 @@ static void draw_armor_table( const std::vector<iteminfo> &vItemDisplay, const i
13211323
info_iter++;
13221324

13231325
while( info_iter != vItemDisplay.end() && info_iter->sType == "ARMOR" ) {
1326+
ImGui::TableNextRow();
13241327
const std::vector<std::string> delimited_strings = delimit_armor_text( *info_iter );
13251328
for( const std::string &text : delimited_strings ) {
13261329
ImGui::TableNextColumn();

0 commit comments

Comments
 (0)