Enabling IME

This commit is contained in:
Jonathan Johnson 2023-10-18 16:07:26 -07:00
parent 87578e5c76
commit 8607fc51d2
No known key found for this signature in database
GPG key ID: A66D6A34D6620579
2 changed files with 11 additions and 6 deletions

View file

@ -161,6 +161,14 @@ impl Widget for Input {
(_, _) => UNHANDLED,
}
}
fn focus(&mut self, context: &mut crate::context::Context<'_, '_>) {
context.set_ime_allowed(true);
}
fn blur(&mut self, context: &mut crate::context::Context<'_, '_>) {
context.set_ime_allowed(false);
}
}
struct LiveEditor {

View file

@ -269,12 +269,9 @@ where
// fn modifiers_changed(&mut self, window: kludgine::app::Window<'_, ()>) {}
// fn ime(
// &mut self,
// window: kludgine::app::Window<'_, ()>,
// ime: kludgine::app::winit::event::Ime,
// ) {
// }
fn ime(&mut self, mut window: RunningWindow<'_>, ime: kludgine::app::winit::event::Ime) {
dbg!(ime);
}
fn cursor_moved(
&mut self,