Add pref to hide cursor when handwriting
This commit is contained in:
@ -56,6 +56,7 @@ pub struct HandwritingStyle {
|
||||
pub bg_line_stroke: Stroke,
|
||||
pub bg_color: Color32,
|
||||
pub animate: bool,
|
||||
pub hide_cursor: bool,
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize, serde::Serialize)]
|
||||
@ -185,12 +186,11 @@ impl Handwriting {
|
||||
}
|
||||
|
||||
let desired_size = Vec2::new(ui.available_width(), self.height);
|
||||
let (response, painter) = ui.allocate_painter(desired_size, Sense::drag());
|
||||
let (mut response, painter) = ui.allocate_painter(desired_size, Sense::drag());
|
||||
|
||||
let mut response = response
|
||||
//.on_hover_cursor(CursorIcon::Crosshair)
|
||||
//.on_hover_and_drag_cursor(CursorIcon::None)
|
||||
;
|
||||
if style.hide_cursor {
|
||||
response = response.on_hover_and_drag_cursor(egui::CursorIcon::None);
|
||||
}
|
||||
|
||||
let size = response.rect.size();
|
||||
|
||||
@ -711,6 +711,7 @@ impl HandwritingStyle {
|
||||
bg_color,
|
||||
bg_line_stroke: Stroke::new(0.5, line_color),
|
||||
animate: true,
|
||||
hide_cursor: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user