oopsie (orderlerss -> ordered rendering)

This commit is contained in:
iris committed 2025-11-22 20:22:26 -05:00
1 parent d757e805e8
commit 90c579d734
10 files changed
+105 -75

No files matched your search

+4 -4
View File
@@ -1,6 +1,6 @@
use crate::{
layout::{
Axis, Layers, Len, Modules, Size, TextAttrs, TextBuffer, TextData, RenderedText,
Axis, PrimitiveLayers, Len, Modules, Size, TextAttrs, TextBuffer, TextData, RenderedText,
TextureHandle, Textures, UiRegion, UiVec2, Vec2, WidgetId, Widgets,
},
render::{Mask, MaskIdx, Primitive, PrimitiveHandle, PrimitiveInst},
@@ -25,7 +25,7 @@ pub struct Painter<'a, 'c> {
struct PainterCtx<'a> {
pub widgets: &'a Widgets,
pub active: &'a mut HashMap<Id, WidgetInstance>,
pub layers: &'a mut Layers,
pub layers: &'a mut PrimitiveLayers,
pub textures: &'a mut Textures,
pub masks: &'a mut TrackedArena<Mask, u32>,
pub text: &'a mut TextData,
@@ -64,7 +64,7 @@ pub struct WidgetInstance {
pub struct PainterData {
pub widgets: Widgets,
pub active: HashMap<Id, WidgetInstance>,
pub layers: Layers,
pub layers: PrimitiveLayers,
pub textures: Textures,
pub text: TextData,
pub output_size: Vec2,
@@ -277,7 +277,7 @@ impl<'a> PainterCtx<'a> {
fn mov(&mut self, id: Id, from: UiRegion, to: UiRegion) {
let active = self.active.get_mut(&id).unwrap();
for h in &active.primitives {
let region = self.layers[h.layer].primitives.region_mut(h);
let region = self.layers[h.layer].region_mut(h);
*region = region.outside(&from).within(&to);
}
active.region = active.region.outside(&from).within(&to);