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, (_, _) => 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 { struct LiveEditor {

View file

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