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

@@ -3,7 +3,7 @@ use slotmap::Key;
use crate::{
drawing::{self, GradientMode, PrimitiveExtent},
layout::WidgetID,
widget::util::WLength,
widget::{WidgetStateFlags, util::WLength},
};
use super::{WidgetObj, WidgetState};
@@ -27,10 +27,13 @@ pub struct WidgetRectangle {
impl WidgetRectangle {
pub fn create(params: WidgetRectangleParams) -> WidgetState {
WidgetState::new(Box::new(Self {
params,
id: WidgetID::null(),
}))
WidgetState::new(
WidgetStateFlags::default(),
Box::new(Self {
params,
id: WidgetID::null(),
}),
)
}
}