wgui: pass motion events further, add consume_mouse_events parameter to widgets (Closes #306), always reverse iter events

This commit is contained in:
Aleksander
2025-12-18 22:02:17 +01:00
parent 5463b6490d
commit 9dbd86db39
12 changed files with 124 additions and 61 deletions

View File

@@ -11,6 +11,7 @@ use crate::{
DEFAULT_METRICS,
custom_glyph::{CustomGlyph, CustomGlyphData},
},
widget::WidgetStateFlags,
};
use super::{WidgetObj, WidgetState};
@@ -29,10 +30,13 @@ pub struct WidgetSprite {
impl WidgetSprite {
pub fn create(params: WidgetSpriteParams) -> WidgetState {
WidgetState::new(Box::new(Self {
params,
id: WidgetID::null(),
}))
WidgetState::new(
WidgetStateFlags::default(),
Box::new(Self {
params,
id: WidgetID::null(),
}),
)
}
pub fn set_color(&mut self, color: drawing::Color) {