Skip to content

Commit

Permalink
Merge pull request #37690 from Night-Pryanik/right-aligned-toggle-min…
Browse files Browse the repository at this point in the history
…imap

Made "Toggle minimap" text in Look Around menu right-aligned
  • Loading branch information
ZhilkinSerg authored Feb 4, 2020
2 parents b579ee0 + c9c9bf8 commit 94b5d83
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6564,14 +6564,7 @@ look_around_result game::look_around( catacurses::window w_info, tripoint &cente
werase( w_info );
draw_border( w_info );

static const std::string title_prefix = "< ";
const std::string title = _( "Look Around" );
static const std::string title_suffix = " >";
static const std::string full_title = title_prefix + title + title_suffix;
const int start_pos = center_text_pos( full_title, 0, getmaxx( w_info ) - 1 );
mvwprintz( w_info, point( start_pos, 0 ), c_white, title_prefix );
wprintz( w_info, c_green, title );
wprintz( w_info, c_white, title_suffix );
center_print( w_info, 0, c_white, string_format( _( "< <color_green>Look Around</color> >" ) ) );

std::string fast_scroll_text = string_format( _( "%s - %s" ),
ctxt.get_desc( "TOGGLE_FAST_SCROLL" ),
Expand All @@ -6581,8 +6574,8 @@ look_around_result game::look_around( catacurses::window w_info, tripoint &cente
ctxt.get_action_name( "toggle_pixel_minimap" ) );
mvwprintz( w_info, point( 1, getmaxy( w_info ) - 1 ), fast_scroll ? c_light_green : c_green,
fast_scroll_text );
mvwprintz( w_info, point( utf8_width( fast_scroll_text ) + 3, getmaxy( w_info ) - 1 ),
pixel_minimap_option ? c_light_green : c_green, pixel_minimap_text );
right_print( w_info, getmaxy( w_info ) - 1, 1, pixel_minimap_option ? c_light_green : c_green,
pixel_minimap_text );

int first_line = 1;
const int last_line = getmaxy( w_info ) - 2;
Expand Down

0 comments on commit 94b5d83

Please sign in to comment.