A config object defines a single node in a WML file, with access to child nodes.
hk_scopes prev_scope_active_
RAII helper class to control the lifetime of a WML hotkey_command.
wml_hotkey_record(const wml_hotkey_record &)=delete
Don't allow copying so objects don't get erased early.
const wml_hotkey_record & operator=(const wml_hotkey_record &)=delete
std::function< void()> cleanup_
Handles removing the associated hotkey_command on this object's destruction.
wml_hotkey_record(wml_hotkey_record &&)=default
But we do want move semantics.
wml_hotkey_record & operator=(wml_hotkey_record &&)=default
Keyboard shortcuts for game actions.
const hotkey_command & get_hotkey_command(const std::string &command)
returns the hotkey_command with the given name
bool has_hotkey_command(const std::string &id)
constexpr uint32_t scope_game
void init_hotkey_commands()
const std::map< std::string_view, hotkey::hotkey_command > & get_hotkey_commands()
returns a container that contains all currently active hotkey_commands.
std::bitset< SCOPE_COUNT > hk_scopes
bool is_scope_active(scope s)
scope
Available hotkey scopes.
constexpr uint32_t scope_main
t_string get_translatable_category_name(HOTKEY_CATEGORY category)
Gets the display name for a given hotkey category.
constexpr uint32_t scope_editor
@ HOTKEY_EDITOR_TOOL_VILLAGE
@ HOTKEY_MINIMAP_DRAW_VILLAGES
@ HOTKEY_EDITOR_BRUSH_NW_SE
@ HOTKEY_EDITOR_SELECT_NONE
@ HOTKEY_EDITOR_CLIPBOARD_ROTATE_CCW
@ HOTKEY_EDITOR_PALETTE_GROUPS
@ HOTKEY_TERRAIN_DESCRIPTION
@ HOTKEY_EDITOR_PALETTE_UPSCROLL
@ HOTKEY_EDITOR_PALETTE_ITEMS_CLEAR
@ HOTKEY_EDITOR_SIDE_REMOVE
@ HOTKEY_WB_EXECUTE_ALL_ACTIONS
@ HOTKEY_EDITOR_BRUSH_NEXT
@ HOTKEY_HELP_ABOUT_SAVELOAD
@ HOTKEY_EDITOR_TOOL_LABEL
@ HOTKEY_EDITOR_CLIPBOARD_ROTATE_CW
@ HOTKEY_EDITOR_CLIPBOARD_PASTE
@ HOTKEY_EDITOR_PARTIAL_UNDO
@ HOTKEY_EDITOR_UNIT_TOGGLE_CANRECRUIT
@ HOTKEY_EDITOR_PALETTE_ITEM_SWAP
@ HOTKEY_EDITOR_TOOL_PAINT
@ HOTKEY_EDITOR_MAP_CLOSE
@ HOTKEY_EDITOR_MAP_GENERATE
@ HOTKEY_SHOW_ENEMY_MOVES
@ HOTKEY_EDITOR_SELECTION_FLIP
@ HOTKEY_EDITOR_TOOL_FILL
@ TITLE_SCREEN__MULTIPLAYER
@ HOTKEY_EDITOR_SCENARIO_SAVE_AS
@ HOTKEY_EDITOR_MAP_SAVE_AS
@ HOTKEY_UNIT_DESCRIPTION
@ HOTKEY_EDITOR_SELECT_ALL
@ HOTKEY_LABEL_TEAM_TERRAIN
@ HOTKEY_EDITOR_DRAW_COORDINATES
@ HOTKEY_UNIT_HOLD_POSITION
@ HOTKEY_EDITOR_TOOL_NEXT
@ HOTKEY_EDITOR_SELECTION_EXPORT
@ HOTKEY_EDITOR_PARTIAL_UPDATE_TRANSITIONS
@ HOTKEY_EDITOR_MAP_CREATE_MASK_TO
@ HOTKEY_REPLAY_NEXT_TURN
@ HOTKEY_EDITOR_SELECTION_CUT
@ HOTKEY_EDITOR_UNIT_CHANGE_ID
@ HOTKEY_SELECT_AND_ACTION
@ HOTKEY_REPLAY_SHOW_EVERYTHING
@ HOTKEY_REPLAY_SHOW_TEAM1
@ HOTKEY_MINIMAP_DRAW_TERRAIN
@ HOTKEY_EDITOR_DRAW_NUM_OF_BITMAPS
@ HOTKEY_EDITOR_BRUSH_SW_NE
@ HOTKEY_EDITOR_TOOL_UNIT
@ HOTKEY_EDITOR_BRUSH_DEFAULT
@ HOTKEY_BEST_ENEMY_MOVES
@ HOTKEY_EDITOR_HELP_TEXT_SHOWN
@ HOTKEY_EDITOR_CHANGE_ADDON_ID
@ HOTKEY_EDITOR_CUSTOM_TODS
@ HOTKEY_EDITOR_REFRESH_IMAGE_CACHE
@ HOTKEY_EDITOR_SELECTION_FILL
@ HOTKEY_EDITOR_CLIPBOARD_FLIP_VERTICAL
@ HOTKEY_EDITOR_MAP_SAVE_ALL
@ HOTKEY_EDITOR_SELECTION_ROTATE
@ HOTKEY_EDITOR_TOOL_STARTING_POSITION
@ HOTKEY_MINIMAP_CODING_TERRAIN
@ HOTKEY_EDITOR_NO_UPDATE_TRANSITIONS
@ HOTKEY_WB_EXECUTE_ACTION
@ HOTKEY_EDITOR_SELECTION_COPY
@ HOTKEY_MINIMAP_DRAW_UNITS
@ HOTKEY_EDITOR_PALETTE_DOWNSCROLL
@ HOTKEY_EDITOR_UNIT_TOGGLE_LOYAL
@ TITLE_SCREEN__PREVIOUS_TIP
@ HOTKEY_WB_BUMP_UP_ACTION
@ HOTKEY_EDITOR_MAP_APPLY_MASK
@ HOTKEY_EDITOR_LOCAL_TIME
@ HOTKEY_EDITOR_UNIT_FACING
@ HOTKEY_REPLAY_NEXT_SIDE
@ HOTKEY_REPLAY_NEXT_MOVE
@ HOTKEY_EDITOR_EDIT_UNIT
@ HOTKEY_EDITOR_SELECTION_RANDOMIZE
@ HOTKEY_EDITOR_SCENARIO_NEW
@ HOTKEY_EDITOR_MAP_SWITCH
@ HOTKEY_EDITOR_SELECT_INVERSE
@ HOTKEY_EDITOR_TOGGLE_TRANSITIONS
@ HOTKEY_EDITOR_AUTO_UPDATE_TRANSITIONS
@ HOTKEY_REPLAY_SKIP_ANIMATION
@ HOTKEY_WB_BUMP_DOWN_ACTION
@ HOTKEY_EDITOR_AREA_RENAME
@ HOTKEY_EDITOR_MAP_RESIZE
@ HOTKEY_EDITOR_DRAW_TERRAIN_CODES
@ HOTKEY_EDITOR_AREA_REMOVE
@ HOTKEY_EDITOR_UPDATE_TRANSITIONS
@ HOTKEY_EDITOR_TOOL_SELECT
@ HOTKEY_EDITOR_AREA_SAVE
@ HOTKEY_EDITOR_REMOVE_LOCATION
@ HOTKEY_EDITOR_SIDE_EDIT
@ HOTKEY_EDITOR_SELECT_ADDON
@ HOTKEY_EDITOR_TOOL_ITEM
@ TITLE_SCREEN__RELOAD_WML
@ HOTKEY_REPLAY_SHOW_EACH
@ HOTKEY_CYCLE_BACK_UNITS
@ HOTKEY_EDITOR_UNIT_TOGGLE_RENAMEABLE
@ HOTKEY_EDITOR_SCENARIO_EDIT
@ HOTKEY_EDITOR_OPEN_ADDON
@ HOTKEY_EDITOR_MAP_REVERT
@ HOTKEY_WB_DELETE_ACTION
@ HOTKEY_EDITOR_CLIPBOARD_FLIP_HORIZONTAL
@ HOTKEY_MINIMAP_CODING_UNIT
Stores all information related to functions that can be bound to hotkeys.
bool toggle
Toggle hotkeys have some restrictions on what can be bound to them.
HOTKEY_COMMAND command
The command associated with this hotkey.
std::string id
The unique ID.
hk_scopes scope
The visibility scope of the command.
bool hidden
If hidden then don't show the command in the hotkey preferences.
static const hotkey_command & null_command()
returns the command that is treated as null
HOTKEY_CATEGORY category
The category of the command.
static const hotkey_command & get_command_by_command(HOTKEY_COMMAND command)
the execute_command argument was changed from HOTKEY_COMMAND to hotkey_command, to be able to call it...
hotkey_command(const hotkey_command &)=default
hotkey_command & operator=(const hotkey_command &)=default
static map_location::direction s