HOTKEY_COMMAND id
the names are strange: the "hotkey::HOTKEY_COMMAND" is named id, and the string to identify the objec...
bool is_scope_active(scope s)
scope
Available hotkey scopes.
void set_scope_active(scope s, bool set)
void add_wml_hotkey(const std::string &id, const t_string &description, const config &default_hotkey)
adds a new wml hotkey to the list, but only if there is no hotkey with that id yet on the list...
Stores all information related to functions that can be bound to hotkeys.
std::list< HOTKEY_COMMAND > get_hotkeys_by_category(HOTKEY_CATEGORY category)
Returns a list of all the hotkeys belonging to the given category.
void clear_hotkey_commands()
void set_active_scopes(hk_scopes s)
Keyboard shortcuts for game actions.
const std::string & get_tooltip(const std::string &command)
std::bitset< SCOPE_COUNT > hk_scopes
void init_hotkey_commands()
hk_scopes scope
The visibility scope of the command.
void deactivate_all_scopes()
Do not use this outside hotkeys.cpp.
std::map< HOTKEY_CATEGORY, std::string > category_name_map_t
const category_name_map_t & get_category_names()
Returns the map of hotkey categories and their display names.
const std::vector< hotkey_command > & get_hotkey_commands()
returns a container that contains all currently active hotkey_commands.
std::string command
The command is unique.
bool toggle
Toggle hotkeys have some restrictions on what can be bound to them.
static map_location::DIRECTION s
const std::string & get_description(const std::string &command)
const hotkey_command & get_hotkey_null()
returns the hotkey_command that is treated as null.
hk_scopes prev_scope_active_
bool has_hotkey_command(const std::string &id)
std::string description
description, tooltip are untranslated
bool hidden
If hidden then don't show the command in the hotkey preferences.
A config object defines a single node in a WML file, with access to child nodes.
const hotkey_command & get_hotkey_command(const std::string &command)
returns the hotkey_command with the given name
void delete_all_wml_hotkeys()
deletes all wml hotkeys, should be called after a game has ended
bool remove_wml_hotkey(const std::string &id)
removes a wml hotkey with the given id, returns true if the deletion was successful ...
HOTKEY_CATEGORY category
The category of the command.
HOTKEY_COMMAND get_id(const std::string &command)
returns get_hotkey_command(command).id