From bd0805dbacaaf63c2a5baff3cab43e048b2deb21 Mon Sep 17 00:00:00 2001 From: Shadow Cat Date: Sat, 15 Nov 2025 01:01:18 -0500 Subject: [PATCH] rename repo to iris + z offset --- Cargo.toml | 2 +- src/core/trait_fns.rs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f8db0e3..e6714c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ui" +name = "iris" version = "0.1.0" edition = "2024" diff --git a/src/core/trait_fns.rs b/src/core/trait_fns.rs index 3eef47d..a75e6ac 100644 --- a/src/core/trait_fns.rs +++ b/src/core/trait_fns.rs @@ -13,6 +13,7 @@ pub trait CoreWidget { fn scroll(self) -> impl WidgetIdFn; fn masked(self) -> impl WidgetFn; fn background(self, w: impl WidgetLike) -> impl WidgetFn; + fn z_offset(self, offset: usize) -> impl WidgetFn; } impl, Tag> CoreWidget for W { @@ -96,6 +97,14 @@ impl, Tag> CoreWidget for W { offset: 0, } } + + fn z_offset(self, offset: usize) -> impl WidgetFn { + move |ui| Stack { + children: vec![self.add(ui).any()], + size: StackSize::Child(0), + offset, + } + } } pub trait CoreWidgetArr, Tag> {