Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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: 2 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/GameClient/GUICallbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ extern void KeyboardOptionsMenuUpdate( WindowLayout *layout, void *userData );
extern void KeyboardOptionsMenuShutdown( WindowLayout *layout, void *userData );
extern WindowMsgHandledType KeyboardOptionsMenuSystem( GameWindow *window, UnsignedInt msg, WindowMsgData mData1, WindowMsgData mData2 );
extern WindowMsgHandledType KeyboardOptionsMenuInput( GameWindow *window, UnsignedInt msg, WindowMsgData mData1, WindowMsgData mData2 );
extern void OpenKeyboardOptionsMenu( void ); ///< open as overlay (no Shell push)
extern void CloseKeyboardOptionsMenu( void ); ///< close overlay and return to Options

// Lan Lobby Menu ----------------------------------------------------------------------------------
extern void LanLobbyMenuInit( WindowLayout *layout, void *userData );
Expand Down
14 changes: 13 additions & 1 deletion GeneralsMD/Code/GameEngine/Include/GameClient/HotKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,21 @@ class HotKeyManager : public SubsystemInterface
AsciiString searchHotKey( const AsciiString& label);
AsciiString searchHotKey( const UnicodeString& uStr );

// --- Custom hotkey overrides (per-CommandButton remapping) ---
void setOverride( const AsciiString& commandButtonName, const AsciiString& newKey );
void removeOverride( const AsciiString& commandButtonName );
AsciiString getOverride( const AsciiString& commandButtonName ) const;
void clearAllOverrides();
void loadOverrides(); ///< Load saved overrides from user preferences file
void saveOverrides(); ///< Persist current overrides to user preferences file

typedef std::map<AsciiString, AsciiString> OverrideMap;
const OverrideMap& getOverrides() const { return m_hotKeyOverrides; }

private:
typedef std::map<AsciiString, HotKey> HotKeyMap;
HotKeyMap m_hotKeyMap;
HotKeyMap m_hotKeyMap;
OverrideMap m_hotKeyOverrides; ///< CommandButton name -> replacement hotkey char
};
extern HotKeyManager *TheHotKeyManager;
//-----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ static FunctionLexicon::TableEntry winLayoutUpdateTable[] =

{ NAMEKEY_INVALID, "MainMenuUpdate", (void*)MainMenuUpdate },
{ NAMEKEY_INVALID, "OptionsMenuUpdate", (void*)OptionsMenuUpdate },
{ NAMEKEY_INVALID, "KeyboardOptionsMenuUpdate", (void*)KeyboardOptionsMenuUpdate },
{ NAMEKEY_INVALID, "SinglePlayerMenuUpdate", (void*)SinglePlayerMenuUpdate },
{ NAMEKEY_INVALID, "MapSelectMenuUpdate", (void*)MapSelectMenuUpdate },
{ NAMEKEY_INVALID, "LanLobbyMenuUpdate", (void*)LanLobbyMenuUpdate },
Expand Down
Loading