From 70e0c52d593258845fd410e9c06b41d73984b280 Mon Sep 17 00:00:00 2001 From: Neckrat Date: Thu, 21 Aug 2025 21:24:43 +0300 Subject: [PATCH] add consume method Co-authored-by: Ivan Yuriev --- lib/controls.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/controls.lua b/lib/controls.lua index f051fad..50de9ab 100644 --- a/lib/controls.lua +++ b/lib/controls.lua @@ -48,6 +48,13 @@ function controls:cache() end end +--- marks a control consumed for the current frame +--- the control will no longer be considered active +--- @param key string +function controls:consume(key) + currentKeys[key] = nil +end + --- check if a control is active --- @param key string function controls:isDown(key)