blob: 8a21cd74b5ebed930d133b18d5fb6c0d2a45c3d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#pragma once
#include "StarPane.hpp"
namespace Star {
STAR_CLASS(TabSetWidget);
STAR_CLASS(ListWidget);
STAR_CLASS(KeybindingsMenu);
class KeybindingsMenu : public Pane {
public:
KeybindingsMenu();
// We need to handle our own Esc dismissal
KeyboardCaptureMode keyboardCaptured() const override;
bool sendEvent(InputEvent const& event) override;
void show() override;
void dismissed() override;
private:
void buildListsFromConfig();
bool activateBinding(Widget* widget);
void setKeybinding(KeyChord desc);
void clearActive();
void exitActiveMode();
void apply();
void revert();
void resetDefaults();
Widget* m_activeKeybinding;
Map<Widget*, InterfaceAction> m_childToAction;
TabSetWidgetPtr m_tabSet;
ListWidgetPtr m_playerList;
ListWidgetPtr m_toolBarList;
ListWidgetPtr m_gameList;
Json m_origConfiguration;
size_t m_maxBindings;
KeyMod m_currentMods;
};
}
|