Decouple mouse::Interaction from UserInterface::draw

This commit is contained in:
Héctor Ramón Jiménez 2025-05-02 23:11:47 +02:00
parent 87afd5b79d
commit 301aac794b
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 171 additions and 187 deletions

View file

@ -246,6 +246,15 @@ where
}
}
pub fn update_mouse(&mut self, interaction: mouse::Interaction) {
if interaction != self.mouse_interaction {
self.raw
.set_cursor(conversion::mouse_interaction(interaction));
self.mouse_interaction = interaction;
}
}
pub fn draw_preedit(&mut self) {
if let Some(preedit) = &self.preedit {
preedit.draw(