1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Move IME candidate window following text cursor (#258)

* egui_web: enable IME support on web.

* Move candidate window following text cursor.

* Preclude too frequent agent movement.

* IME candidate window move on native app.
This commit is contained in:
Lin Han
2021-03-30 14:48:55 +08:00
committed by GitHub
parent 1c60dc8d66
commit 22cd1a8e10
6 changed files with 74 additions and 11 deletions

View File

@@ -138,6 +138,7 @@ pub struct AppRunner {
screen_reader: crate::screen_reader::ScreenReader,
#[cfg(feature = "http")]
http: Arc<http::WebHttp>,
pub(crate) text_cursor: Option<egui::Pos2>,
}
impl AppRunner {
@@ -156,6 +157,7 @@ impl AppRunner {
screen_reader: Default::default(),
#[cfg(feature = "http")]
http: Arc::new(http::WebHttp {}),
text_cursor: None,
})
}
@@ -222,7 +224,7 @@ impl AppRunner {
if self.web_backend.ctx.memory().options.screen_reader {
self.screen_reader.speak(&egui_output.events_description());
}
handle_output(&egui_output);
handle_output(&egui_output, self);
{
let epi::backend::AppOutput {