From ea5b3d8b7926cb33a8544b80015fbeb85be333f9 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Fri, 15 Dec 2023 17:43:00 -0500 Subject: [PATCH] windowing inputs --- include/blt/gfx/window.h | 4 ++++ src/blt/gfx/window.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/blt/gfx/window.h b/include/blt/gfx/window.h index 054e474..accbe4d 100644 --- a/include/blt/gfx/window.h +++ b/include/blt/gfx/window.h @@ -80,6 +80,10 @@ namespace blt::gfx std::string getClipboard(); + bool isMousePressed(int button); + + bool isKeyPressed(int key); + void cleanup(); } diff --git a/src/blt/gfx/window.cpp b/src/blt/gfx/window.cpp index ea025a4..92ae633 100644 --- a/src/blt/gfx/window.cpp +++ b/src/blt/gfx/window.cpp @@ -194,4 +194,14 @@ namespace blt::gfx { return glfwGetClipboardString(window_state.window); } + + bool isMousePressed(int button) + { + return window_state.inputManager.isMousePressed(button); + } + + bool isKeyPressed(int key) + { + return window_state.inputManager.isKeyPressed(key); + } }