sys: Improve shortcut api

This commit is contained in:
WerWolv
2021-04-16 19:43:54 +02:00
parent 59dd372ec8
commit 771bb22962
8 changed files with 54 additions and 44 deletions

View File

@@ -24,7 +24,7 @@ namespace hex {
bool isAvailable() override { return true; }
bool shouldProcess() override { return true; }
bool handleShortcut(int key, int mods) override;
bool handleShortcut(bool keys[512], bool ctrl, bool shift, bool alt) override;
bool hasViewMenuItemEntry() override { return false; }
ImVec2 getMinSize() override { return ImVec2(400, 100); }

View File

@@ -27,7 +27,7 @@ namespace hex {
void drawContent() override;
void drawAlwaysVisible() override;
void drawMenu() override;
bool handleShortcut(int key, int mods) override;
bool handleShortcut(bool keys[512], bool ctrl, bool shift, bool alt) override;
private:
MemoryEditor m_memoryEditor;

View File

@@ -52,6 +52,8 @@ namespace hex {
double m_lastFrameTime;
bool m_prevKeysDown[512];
static inline std::tuple<int, int> s_currShortcut = { -1, -1 };
};