move event data out of widgetdata
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#![feature(gen_blocks)]
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(unsize)]
|
||||
#![feature(option_into_flat_iter)]
|
||||
|
||||
pub mod default;
|
||||
pub mod event;
|
||||
|
||||
Reference in New Issue
Block a user