BIND_DEVTOOLS_CONSOLE
This commit is contained in:
parent
bb4f573d0f
commit
5834233162
@ -9,6 +9,7 @@ world.generators.default=Default
|
|||||||
world.generators.flat=Flat
|
world.generators.flat=Flat
|
||||||
|
|
||||||
# Bindings
|
# Bindings
|
||||||
|
devtools.console=Console
|
||||||
movement.forward=Forward
|
movement.forward=Forward
|
||||||
movement.back=Back
|
movement.back=Back
|
||||||
movement.left=Left
|
movement.left=Left
|
||||||
|
|||||||
@ -56,6 +56,7 @@ settings.UI Sounds=Звуки Интерфейса
|
|||||||
settings.V-Sync=Вертикальная Синхронизация
|
settings.V-Sync=Вертикальная Синхронизация
|
||||||
|
|
||||||
# Управление
|
# Управление
|
||||||
|
devtools.console=Консоль
|
||||||
movement.forward=Вперёд
|
movement.forward=Вперёд
|
||||||
movement.back=Назад
|
movement.back=Назад
|
||||||
movement.left=Влево
|
movement.left=Влево
|
||||||
|
|||||||
@ -24,6 +24,7 @@ void corecontent::setup(ContentBuilder* builder) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void corecontent::setup_bindings() {
|
void corecontent::setup_bindings() {
|
||||||
|
Events::bind(BIND_DEVTOOLS_CONSOLE, inputtype::keyboard, keycode::GRAVE_ACCENT);
|
||||||
Events::bind(BIND_MOVE_FORWARD, inputtype::keyboard, keycode::W);
|
Events::bind(BIND_MOVE_FORWARD, inputtype::keyboard, keycode::W);
|
||||||
Events::bind(BIND_MOVE_BACK, inputtype::keyboard, keycode::S);
|
Events::bind(BIND_MOVE_BACK, inputtype::keyboard, keycode::S);
|
||||||
Events::bind(BIND_MOVE_RIGHT, inputtype::keyboard, keycode::D);
|
Events::bind(BIND_MOVE_RIGHT, inputtype::keyboard, keycode::D);
|
||||||
|
|||||||
@ -9,6 +9,7 @@ inline const std::string CORE_AIR = "core:air";
|
|||||||
inline const std::string TEXTURE_NOTFOUND = "notfound";
|
inline const std::string TEXTURE_NOTFOUND = "notfound";
|
||||||
|
|
||||||
// built-in bindings
|
// built-in bindings
|
||||||
|
inline const std::string BIND_DEVTOOLS_CONSOLE = "devtools.console";
|
||||||
inline const std::string BIND_MOVE_FORWARD = "movement.forward";
|
inline const std::string BIND_MOVE_FORWARD = "movement.forward";
|
||||||
inline const std::string BIND_MOVE_BACK = "movement.back";
|
inline const std::string BIND_MOVE_BACK = "movement.back";
|
||||||
inline const std::string BIND_MOVE_LEFT = "movement.left";
|
inline const std::string BIND_MOVE_LEFT = "movement.left";
|
||||||
|
|||||||
@ -204,6 +204,9 @@ void Hud::processInput(bool visible) {
|
|||||||
setPause(true);
|
setPause(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!pause && Events::active(BIND_DEVTOOLS_CONSOLE)) {
|
||||||
|
showOverlay(assets->getLayout("core:console"), false);
|
||||||
|
}
|
||||||
if (!Window::isFocused() && !pause && !isInventoryOpen()) {
|
if (!Window::isFocused() && !pause && !isInventoryOpen()) {
|
||||||
setPause(true);
|
setPause(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
/// @brief Represents glfw3 keycode values.
|
/// @brief Represents glfw3 keycode values.
|
||||||
enum class keycode : int {
|
enum class keycode : int {
|
||||||
|
GRAVE_ACCENT = 96,
|
||||||
ENTER = 257,
|
ENTER = 257,
|
||||||
TAB = 258,
|
TAB = 258,
|
||||||
SPACE = 32,
|
SPACE = 32,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user