Skip to content

Commit

Permalink
use the monospaced font for the art on the end screen
Browse files Browse the repository at this point in the history
because ascii art. Also, vertically align the “Last Words:” label in
front of the textbox, so that the baselines of the two are lined up.

Partially fixes #77297
  • Loading branch information
db48x committed Oct 31, 2024
1 parent ad8047d commit 7eb82f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2956,6 +2956,7 @@ void end_screen_ui_impl::draw_controls()
}

if( art.is_valid() ) {
cataimgui::PushMonoFont();
int row = 1;
for( const std::string &line : art->picture ) {
cataimgui::draw_colored_text( line );
Expand All @@ -2969,10 +2970,12 @@ void end_screen_ui_impl::draw_controls()
}
row++;
}
ImGui::PopFont();
}

if( !input_label.empty() ) {
ImGui::NewLine();
ImGui::AlignTextToFramePadding();
cataimgui::draw_colored_text( input_label );
ImGui::SameLine( str_width_to_pixels( input_label.size() + 2 ), 0 );
ImGui::InputText( "##LAST_WORD_BOX", text.data(), text.size() );
Expand Down

0 comments on commit 7eb82f9

Please sign in to comment.