iris: fold render state into Ui
This commit is contained in:
1 parent
599d33287c
commit
f49b284b46
35 files changed
+491
-429
No files matched your search
@@ -3,7 +3,9 @@ use iris::harness::{Harness, TouchAction};
|
||||
use iris::prelude::*;
|
||||
|
||||
fn fence_scroll_in(h: &Harness, top: f32, bottom: f32) -> Option<(WidgetId, PixelRegion)> {
|
||||
h.render
|
||||
let render_handle = h.rsc.ui.render_state();
|
||||
let render_state = render_handle.get();
|
||||
render_state
|
||||
.active
|
||||
.keys()
|
||||
.copied()
|
||||
@@ -16,7 +18,7 @@ fn fence_scroll_in(h: &Harness, top: f32, bottom: f32) -> Option<(WidgetId, Pixe
|
||||
.is_some_and(|s| s.axis() == Axis::X)
|
||||
})
|
||||
.find_map(|id| {
|
||||
let r = h.render.window_region(&id, &h.rsc)?;
|
||||
let r = render_state.window_region(&id, &h.rsc)?;
|
||||
(r.top_left.y >= top && r.bot_right.y <= bottom).then_some((id, r))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user