From d1732fe2b7a8716d4bea7c4223934ae0add5b6ce Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Fri, 22 Mar 2024 18:35:00 +0100 Subject: [PATCH] add image to frame layer --- hui/src/frame.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hui/src/frame.rs b/hui/src/frame.rs index d16d9a5..842d8aa 100644 --- a/hui/src/frame.rs +++ b/hui/src/frame.rs @@ -2,7 +2,11 @@ use glam::{Vec2, vec2}; use derive_more::{Add, AddAssign, Sub, SubAssign}; -use crate::{element::fill_rect::FillRect, layout::{Size, Size2d}}; +use crate::{ + draw::ImageHandle, + element::fill_rect::FillRect, + layout::{Size, Size2d} +}; /// Point inside a frame /// @@ -133,7 +137,8 @@ impl FramePoint2d { enum FrameLayer { Rect { - fill: FillRect, + color: FillRect, + image: Option, top_left: FramePoint2d, bottom_right: FramePoint2d, }