Module: gameui.style

Source: ./gameui/style.reef


Overview

gameui/style.reef - Styling for immediate mode UI Part of reef-stdlib Game UI module

Style provides colors, sizes, and visual parameters for the UI. Unlike the retained mode theme system, this is simpler and more focused on game UI needs.


Types

Style

Fields:

Name Type
background core.Color
foreground core.Color
primary core.Color
secondary core.Color
accent core.Color
border core.Color
hover core.Color
pressed core.Color
disabled core.Color
error core.Color
success core.Color
warning core.Color
padding float
item_spacing float
border_width float
border_radius float
font_size float
button_h float
checkbox_s float
slider_h float
slider_thumb_s float
text_field_h float

Functions

fn default_style(): Style

fn dark_style(): Style

fn light_style(): Style

fn style_background(s: Style): core.Color

fn style_foreground(s: Style): core.Color

fn style_primary(s: Style): core.Color

fn style_secondary(s: Style): core.Color

fn style_accent(s: Style): core.Color

fn style_border(s: Style): core.Color

fn style_hover(s: Style): core.Color

fn style_pressed(s: Style): core.Color

fn style_disabled(s: Style): core.Color

fn style_error(s: Style): core.Color

fn style_success(s: Style): core.Color

fn style_warning(s: Style): core.Color

fn style_padding(s: Style): float

fn style_item_spacing(s: Style): float

fn style_border_width(s: Style): float

fn style_border_radius(s: Style): float

fn style_font_size(s: Style): float

fn button_height(s: Style): float

fn checkbox_size(s: Style): float

fn slider_height(s: Style): float

fn slider_thumb_size(s: Style): float

fn text_field_height(s: Style): float

fn with_background(s: Style, color: core.Color): Style

fn with_foreground(s: Style, color: core.Color): Style

fn with_primary(s: Style, color: core.Color): Style

fn with_padding(s: Style, padding: float): Style

fn with_item_spacing(s: Style, spacing: float): Style

fn with_border_width(s: Style, width: float): Style

fn with_border_radius(s: Style, radius: float): Style

fn with_font_size(s: Style, size: float): Style


Generated by reefc doc