move event data out of widgetdata

This commit is contained in:
2025-12-23 15:42:04 -05:00
parent 54534c4c34
commit 462c0e6416
7 changed files with 24 additions and 29 deletions

View File

@@ -148,7 +148,7 @@ impl<State: RunEvents> SensorUi<State> for State {
let mut active = std::mem::take(&mut self.events_mut().get_type::<CursorSense>().active);
for layer in layers.indices().rev() {
let mut sensed = false;
for (id, sensor) in active.get_mut(&layer).into_iter().flatten() {
for (id, sensor) in active.get_mut(&layer).into_flat_iter() {
let shape = self.ui().active.get(id).unwrap().region;
let region = shape.to_px(window_size);
let in_shape = cursor.exists && region.contains(cursor.pos);

View File

@@ -3,6 +3,7 @@
#![feature(gen_blocks)]
#![feature(associated_type_defaults)]
#![feature(unsize)]
#![feature(option_into_flat_iter)]
pub mod default;
pub mod event;