Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Martialarts select and menu harmonisation #39309

Merged
merged 3 commits into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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