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

Implement selective auto note preferences and a manager GUI to modify them #33560

Merged
merged 22 commits into from
Aug 31, 2019
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
27 changes: 27 additions & 0 deletions data/raw/keybindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,27 @@
{ "input_method": "gamepad", "key": "JOY_RIGHT" }
]
},
{
"type": "keybinding",
"id": "ENABLE_MAPEXTRA_NOTE",
"category": "AUTO_NOTES",
"name": "Enable auto note for map extra",
"bindings": [ { "input_method": "keyboard", "key": "e" }, { "input_method": "keyboard", "key": "E" } ]
},
{
"type": "keybinding",
"id": "SWITCH_AUTO_NOTE_OPTION",
"category": "AUTO_NOTES",
"name": "Toggle auto notes option",
"bindings": [ { "input_method": "keyboard", "key": "s" }, { "input_method": "keyboard", "key": "S" } ]
},
{
"type": "keybinding",
"id": "DISABLE_MAPEXTRA_NOTE",
"category": "AUTO_NOTES",
"name": "Disable auto note for map extra",
"bindings": [ { "input_method": "keyboard", "key": "d" }, { "input_method": "keyboard", "key": "D" } ]
},
{
"type": "keybinding",
"id": "ADD_RULE",
Expand Down Expand Up @@ -2062,6 +2083,12 @@
"category": "DEFAULTMODE",
"id": "open_autopickup"
},
{
"type": "keybinding",
"name": "Autonotes manager",
"category": "DEFAULTMODE",
"id": "open_autonotes"
},
{
"type": "keybinding",
"name": "Safe Mode manager",
Expand Down
4 changes: 4 additions & 0 deletions src/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ std::string action_ident( action_id act )
return "open_options";
case ACTION_AUTOPICKUP:
return "open_autopickup";
case ACTION_AUTONOTES:
return "open_autonotes";
case ACTION_SAFEMODE:
return "open_safemode";
case ACTION_COLOR:
Expand Down Expand Up @@ -408,6 +410,7 @@ bool can_action_change_worldstate( const action_id act )
case ACTION_KEYBINDINGS:
case ACTION_OPTIONS:
case ACTION_AUTOPICKUP:
case ACTION_AUTONOTES:
case ACTION_SAFEMODE:
case ACTION_COLOR:
case ACTION_WORLD_MODS:
Expand Down Expand Up @@ -945,6 +948,7 @@ action_id handle_main_menu()
REGISTER_ACTION( ACTION_KEYBINDINGS );
REGISTER_ACTION( ACTION_OPTIONS );
REGISTER_ACTION( ACTION_AUTOPICKUP );
REGISTER_ACTION( ACTION_AUTONOTES );
REGISTER_ACTION( ACTION_SAFEMODE );
REGISTER_ACTION( ACTION_COLOR );
REGISTER_ACTION( ACTION_WORLD_MODS );
Expand Down
2 changes: 2 additions & 0 deletions src/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ enum action_id : int {
ACTION_OPTIONS,
/** Open autopickup manager */
ACTION_AUTOPICKUP,
/** Open autonotes manager */
ACTION_AUTONOTES,
/** Open safemode manager */
ACTION_SAFEMODE,
/** Open color manager */
Expand Down
Loading