Skip to content

Commit

Permalink
Martialarts select and menu harmonisation (#39309)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pupsi-Mupsi authored Apr 7, 2020
1 parent 280e932 commit e952690
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
11 changes: 7 additions & 4 deletions src/newcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,13 @@ static matype_id choose_ma_style( const character_type type, const std::vector<m

uilist menu;
menu.allow_cancel = false;
menu.text = string_format( _( "Select a style. (press %s for more info)\n"
"STR: %d, DEX: %d, PER: %d, INT: %d" ),
ctxt.get_desc( "SHOW_DESCRIPTION" ),
u.get_str(), u.get_dex(), u.get_per(), u.get_int() );
menu.text = string_format( _( "Select a style.\n"
"\n"
"STR: <color_white>%d</color>, DEX: <color_white>%d</color>, "
"PER: <color_white>%d</color>, INT: <color_white>%d</color>\n"
"Press [<color_yellow>%s</color>] for more info.\n" ),
u.get_str(), u.get_dex(), u.get_per(), u.get_int(),
ctxt.get_desc( "SHOW_DESCRIPTION" ) );
ma_style_callback callback( 0, styles );
menu.callback = &callback;
menu.input_category = "MELEE_STYLE_PICKER";
Expand Down
10 changes: 7 additions & 3 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3096,9 +3096,13 @@ bool character_martial_arts::pick_style( const avatar &you ) // Style selection
ctxt.register_action( "SHOW_DESCRIPTION" );

uilist kmenu;
kmenu.text = colorize( string_format( _( "Select a style. "
"Press <color_yellow>%s</color> for more info." ),
ctxt.get_desc( "SHOW_DESCRIPTION" ) ), c_white );
kmenu.text = string_format( _( "Select a style.\n"
"\n"
"STR: <color_white>%d</color>, DEX: <color_white>%d</color>, "
"PER: <color_white>%d</color>, INT: <color_white>%d</color>\n"
"Press [<color_yellow>%s</color>] for more info.\n" ),
you.get_str(), you.get_dex(), you.get_per(), you.get_int(),
ctxt.get_desc( "SHOW_DESCRIPTION" ) );
ma_style_callback callback( static_cast<size_t>( STYLE_OFFSET ), selectable_styles );
kmenu.callback = &callback;
kmenu.input_category = "MELEE_STYLE_PICKER";
Expand Down

0 comments on commit e952690

Please sign in to comment.