From b8a9c3464a7ec4c60073fb4441129fa97b36442a Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Fri, 8 Jan 2021 16:08:09 +0100 Subject: Fix CLI not capturing keyboard This is not a very nice solution and is due to limitations of raylib. Since I want to change the way input is handled in the future this is an okay solution, but when overhauling the input needs to be changed. --- src/cli/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cli/mod.rs') diff --git a/src/cli/mod.rs b/src/cli/mod.rs index e96070f..eda274f 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -41,6 +41,11 @@ impl CLI { } } + /// Checks if the CLI is currently active. This means input to other things should be ignored. + pub fn active(&self) -> bool { + self.active + } + /// Handle input for the command line and perform any commands the user may want to run. pub fn update(&mut self, rl: &mut RaylibHandle, editor: &mut Editor) { /* Check if the CLI is currently active. If not and it should not be activated according to -- cgit v1.2.3-70-g09d2