#[non_exhaustive]pub struct MenuConfig {
pub area: TileRect,
pub border: Option<BorderStyle>,
pub content: TileRect,
pub cursor: CursorStyle,
pub label_positions: Vec<(u32, u32, String)>,
pub gap: u32,
pub padding: EdgeInsets,
}Expand description
Rendering-level layout for a menu. Describes where and how a menu is drawn on the 160×144 canvas.
Unlike MenuLayout (which is a game-data provider interface),
MenuConfig is the concrete rendering configuration consumed by
dotzuki_ui widget drawing functions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.area: TileRectThe outer bounding box of the menu in tile coordinates.
border: Option<BorderStyle>Border tile configuration. None → no border (transparent background).
content: TileRectThe inner content area (text, icons, etc.) relative to area.
cursor: CursorStyleCursor appearance.
label_positions: Vec<(u32, u32, String)>Pre-positioned labels at frame-relative tile coordinates.
Each entry is (tx, ty, text).
gap: u32Vertical gap between list items in tile rows.
padding: EdgeInsetsInterior padding inside the border.
Implementations§
Source§impl MenuConfig
impl MenuConfig
pub fn new( area: TileRect, border: Option<BorderStyle>, content: TileRect, cursor: CursorStyle, ) -> Self
Trait Implementations§
Source§impl Clone for MenuConfig
impl Clone for MenuConfig
Source§fn clone(&self) -> MenuConfig
fn clone(&self) -> MenuConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MenuConfig
impl Debug for MenuConfig
Source§impl PartialEq for MenuConfig
impl PartialEq for MenuConfig
impl StructuralPartialEq for MenuConfig
Auto Trait Implementations§
impl Freeze for MenuConfig
impl RefUnwindSafe for MenuConfig
impl Send for MenuConfig
impl Sync for MenuConfig
impl Unpin for MenuConfig
impl UnsafeUnpin for MenuConfig
impl UnwindSafe for MenuConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more