aboutsummaryrefslogtreecommitdiff
path: root/src/cli
diff options
context:
space:
mode:
authorArne Dußin2021-01-08 16:08:09 +0100
committerArne Dußin2021-01-08 16:08:09 +0100
commitb8a9c3464a7ec4c60073fb4441129fa97b36442a (patch)
treed1147f7b017e7ff7c0fc4895501fe030b038780a /src/cli
parent60327dd3ef85a263173e6275cb122c9191c030fe (diff)
downloadgraf_karto-b8a9c3464a7ec4c60073fb4441129fa97b36442a.tar.gz
graf_karto-b8a9c3464a7ec4c60073fb4441129fa97b36442a.zip
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.
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/mod.rs5
1 files changed, 5 insertions, 0 deletions
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