sensors now run in correct order
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use app::App;
|
||||
use cosmic_text::{Family, Motion};
|
||||
use cosmic_text::Family;
|
||||
use render::Renderer;
|
||||
use senses::*;
|
||||
use ui::prelude::*;
|
||||
use winit::{
|
||||
event::WindowEvent,
|
||||
event_loop::ActiveEventLoop,
|
||||
keyboard::{Key, NamedKey},
|
||||
window::Window,
|
||||
};
|
||||
use winit::{event::WindowEvent, event_loop::ActiveEventLoop, window::Window};
|
||||
|
||||
use crate::testing::input::Input;
|
||||
|
||||
@@ -207,29 +202,9 @@ impl Client {
|
||||
WindowEvent::KeyboardInput { event, .. } => {
|
||||
if let Some(sel) = &self.selected
|
||||
&& event.state.is_pressed()
|
||||
&& self.ui.text(sel).apply_event(&event).unfocus()
|
||||
{
|
||||
let w = &mut self.ui.text(sel);
|
||||
match &event.logical_key {
|
||||
Key::Named(named) => match named {
|
||||
NamedKey::Backspace => w.backspace(),
|
||||
NamedKey::Delete => w.delete(),
|
||||
NamedKey::Space => w.insert(" "),
|
||||
NamedKey::Enter => w.newline(),
|
||||
NamedKey::ArrowRight => w.motion(Motion::Right),
|
||||
NamedKey::ArrowLeft => w.motion(Motion::Left),
|
||||
NamedKey::ArrowUp => w.motion(Motion::Up),
|
||||
NamedKey::ArrowDown => w.motion(Motion::Down),
|
||||
NamedKey::Escape => {
|
||||
w.deselect();
|
||||
self.selected = None;
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
Key::Character(text) => {
|
||||
w.insert(text);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
self.selected = None;
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
|
||||
Reference in New Issue
Block a user