mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-16 10:04:42 +03:00
feat(console): add helpers for console hotkey
This commit is contained in:
parent
309ba8085c
commit
3549abd87f
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
static int32_t s_active;
|
static int32_t s_active;
|
||||||
static int32_t s_consoleAccessEnabled;
|
static int32_t s_consoleAccessEnabled;
|
||||||
|
static KEY s_consoleKey = KEY_TILDE;
|
||||||
|
|
||||||
int32_t ConsoleAccessGetEnabled() {
|
int32_t ConsoleAccessGetEnabled() {
|
||||||
return s_consoleAccessEnabled;
|
return s_consoleAccessEnabled;
|
||||||
@ -15,6 +16,14 @@ int32_t ConsoleGetActive() {
|
|||||||
return s_active;
|
return s_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KEY ConsoleGetHotKey() {
|
||||||
|
return s_consoleKey;
|
||||||
|
}
|
||||||
|
|
||||||
void ConsoleSetActive(int32_t active) {
|
void ConsoleSetActive(int32_t active) {
|
||||||
s_active = active;
|
s_active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConsoleSetHotKey(KEY hotkey) {
|
||||||
|
s_consoleKey = hotkey;
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef CONSOLE_CONSOLE_HPP
|
#ifndef CONSOLE_CONSOLE_HPP
|
||||||
#define CONSOLE_CONSOLE_HPP
|
#define CONSOLE_CONSOLE_HPP
|
||||||
|
|
||||||
|
#include "event/Types.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
int32_t ConsoleAccessGetEnabled();
|
int32_t ConsoleAccessGetEnabled();
|
||||||
@ -9,6 +10,10 @@ void ConsoleAccessSetEnabled(int32_t enable);
|
|||||||
|
|
||||||
int32_t ConsoleGetActive();
|
int32_t ConsoleGetActive();
|
||||||
|
|
||||||
|
KEY ConsoleGetHotKey();
|
||||||
|
|
||||||
void ConsoleSetActive(int32_t active);
|
void ConsoleSetActive(int32_t active);
|
||||||
|
|
||||||
|
void ConsoleSetHotKey(KEY hotkey);
|
||||||
|
|
||||||
#endif // ifndef CONSOLE_CONSOLE_HPP
|
#endif // ifndef CONSOLE_CONSOLE_HPP
|
||||||
|
Loading…
Reference in New Issue
Block a user