From 290157e8d95db4916afaf96cc006c4971beea194 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Sun, 24 Mar 2024 19:07:51 +0100 Subject: [PATCH] improve `frame_rect` macro docs --- hui/src/macros.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hui/src/macros.rs b/hui/src/macros.rs index 8de75d9..90b86ff 100644 --- a/hui/src/macros.rs +++ b/hui/src/macros.rs @@ -62,6 +62,18 @@ macro_rules! size { } /// Helper macro for constructing a `FrameRect` +/// +/// # Example: +/// ``` +/// frame_rect! { +/// color: (0.2, 0.2, 0.3, 1.), +/// corner_radius: 5., +/// }; +/// ``` +/// +/// # Note: +/// - If the `image` field is set, but not `color`, the `color` field will default to [`WHITE`](crate::color::WHITE) (to ensure visibility) +/// - If both `color` and `image` are not set, the `color` field will default to [`TRANSPARENT`](crate::color::TRANSPARENT) #[macro_export] macro_rules! frame_rect { {} => {