Skip to content

Commit

Permalink
Implement selective auto note preferences and a manager GUI to modify…
Browse files Browse the repository at this point in the history
… them (#33560)

* Implemented basic auto note settings holder

* Implemented access to map extras factory, as well as member functions that use string_id<T>

* Added keybindings for actions from auto notes manager

* Part of auto notes manager implementation

* Finished auto note manager gui implementation

* Modified map extra subsystem to respect the auto note settings

* Applied astyle fixes

* Implemented spoiler-free GUI experience

* Changed to make CI clang-tidy shut up

* Removed some left-over debug messages.

* Try to shut up "unused result" warning, lets see if this works

* Second try to fix CI build§

* Applied most of code review suggestions

* More code review changes

* Fixed missing reference

* Astyle

* Disabled clang-tidy linting on two lines

* More review changes

* clang-tidy related fixes

* Apply suggestions from code review

Co-Authored-By: Anton Burmistrov <[email protected]>

* Changed map extras to special encounters

* Reverted replacing point with point_east
  • Loading branch information
nshcat authored and ZhilkinSerg committed Aug 31, 2019
1 parent a84b402 commit 4b90ec9
Show file tree
Hide file tree
Showing 9 changed files with 549 additions and 8 deletions.
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 @@ -360,6 +360,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 @@ -410,6 +412,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 @@ -948,6 +951,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 @@ -255,6 +255,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

0 comments on commit 4b90ec9

Please sign in to comment.