Commit 584833f5 authored by Rahix's avatar Rahix 🦀
Browse files

ingame: Add scaffold for keyboard events

parent 70664afb
......@@ -49,12 +49,13 @@ impl InGameState {
}
impl state::State for InGameState {
fn init(&mut self, _init: state::StateInitializer) -> state::Transition {
fn init(&mut self, init: state::StateInitializer) -> state::Transition {
self.gui_svg
.style()
.set_property("display", "block")
.unwrap();
init.register_keyevents();
state::Transition::Loop
}
......@@ -69,6 +70,11 @@ impl state::State for InGameState {
.unwrap();
}
fn event(&mut self, _target: &str, event: state::Event) -> state::Transition {
crate::console_log!("event: {:?}", event);
state::Transition::Keep
}
fn update(&mut self) -> state::Transition {
{
let rendering = self.resources.get::<resources::Rendering>().unwrap();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment