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

inv_ui: Allow disabling numeric map item shortcuts #62436

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/inventory_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ void inventory_selector::prepare_layout( size_t client_width, size_t client_heig

void inventory_selector::reassign_custom_invlets()
{
if( invlet_type_ == SELECTOR_INVLET_DEFAULT || invlet_type_ == SELECTOR_INVLET_NUMERIC ) {
if( ( invlet_type_ == SELECTOR_INVLET_DEFAULT || invlet_type_ == SELECTOR_INVLET_NUMERIC ) && get_option<bool>("ITEM_NUMERIC_SHORTCUTS") ) {
Kamayana marked this conversation as resolved.
Show resolved Hide resolved
int min_invlet = static_cast<uint8_t>( use_invlet ? '0' : '\0' );
for( inventory_column *elem : columns ) {
elem->prepare_paging();
Expand Down
5 changes: 5 additions & 0 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,11 @@ void options_manager::add_options_interface()
},
"favorites" );

add("ITEM_NUMERIC_SHORTCUTS", "interface", to_translation("Use Numeric Item Shortcuts"),
to_translation("If true, assign numeric shortcuts to the first ten items outside of the inventory in item interaction menus."),
true
);
Kamayana marked this conversation as resolved.
Show resolved Hide resolved

add( "ITEM_HEALTH_BAR", "interface", to_translation( "Show item health bars" ),
// NOLINTNEXTLINE(cata-text-style): one space after "etc."
to_translation( "If true, show item health bars instead of reinforced, scratched etc. text." ),
Expand Down