Module pix_engine::gui::theme
source · [−]Expand description
UI theme methods.
Provides various methods for changing and querying the current UI theme used to render text and UI widgets.
Example
fn on_update(&mut self, s: &mut PixState) -> PixResult<()> {
s.fill(Color::CADET_BLUE); // Change text color
s.font_size(14)?;
s.font_style(FontStyle::BOLD);
s.font_family(Font::INCONSOLATA)?;
s.text("Blue, bold, size 14 text in Inconsolata font")?;
Ok(())
}Structs
Represents a font family name along with the font glyph source.
A set of FontStyles for body, heading, and monospace text.
A set of font families for body, heading, and monospace text.
A set of styles for sizing, padding, borders, etc for theming UI elements.
Builds a Spacing instance by customizing various space and padding settings.
A UI Theme containing font families, sizes, styles, and colors.