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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user