Skip to main content

Theme

Struct Theme 

Source
pub struct Theme {
Show 33 fields pub name: &'static str, pub bg_color: ColorRGBA, pub panel_bg: ColorRGBA, pub panel_border: ColorRGBA, pub text_color: ColorRGBA, pub text_dim: ColorRGBA, pub text_highlight: ColorRGBA, pub button_bg: ColorRGBA, pub button_hover: ColorRGBA, pub button_pressed: ColorRGBA, pub button_border: ColorRGBA, pub health_bar_bg: ColorRGBA, pub health_bar_fill: ColorRGBA, pub health_bar_border: ColorRGBA, pub mana_bar_bg: ColorRGBA, pub mana_bar_fill: ColorRGBA, pub xp_bar_bg: ColorRGBA, pub xp_bar_fill: ColorRGBA, pub slot_bg: ColorRGBA, pub slot_hover: ColorRGBA, pub slot_border: ColorRGBA, pub dialog_bg: ColorRGBA, pub dialog_border: ColorRGBA, pub menu_bg: ColorRGBA, pub menu_item_bg: ColorRGBA, pub menu_item_hover: ColorRGBA, pub menu_item_selected: ColorRGBA, pub font_size: u32, pub font_size_small: u32, pub font_size_title: u32, pub padding: f32, pub spacing: f32, pub border_width: f32,
}
Expand description

Tema visual para toolkit-ry

Fields§

§name: &'static str§bg_color: ColorRGBA§panel_bg: ColorRGBA§panel_border: ColorRGBA§text_color: ColorRGBA§text_dim: ColorRGBA§text_highlight: ColorRGBA§button_bg: ColorRGBA§button_hover: ColorRGBA§button_pressed: ColorRGBA§button_border: ColorRGBA§health_bar_bg: ColorRGBA§health_bar_fill: ColorRGBA§health_bar_border: ColorRGBA§mana_bar_bg: ColorRGBA§mana_bar_fill: ColorRGBA§xp_bar_bg: ColorRGBA§xp_bar_fill: ColorRGBA§slot_bg: ColorRGBA§slot_hover: ColorRGBA§slot_border: ColorRGBA§dialog_bg: ColorRGBA§dialog_border: ColorRGBA§menu_bg: ColorRGBA§menu_item_bg: ColorRGBA§menu_item_hover: ColorRGBA§menu_item_selected: ColorRGBA§font_size: u32§font_size_small: u32§font_size_title: u32§padding: f32§spacing: f32§border_width: f32

Implementations§

Source§

impl Theme

Source

pub fn dark() -> Self

Tema oscuro (default) — estilo moderno

Source

pub fn light() -> Self

Tema claro — estilo limpio

Source

pub fn retro() -> Self

Tema retro — estilo pixel art 8-bit

Source

pub fn neon() -> Self

Tema neón — estilo cyberpunk con glow

Source

pub fn minimal() -> Self

Tema minimalista — ultra limpio

Source

pub fn all() -> &'static [fn() -> Self]

Obtener todos los temas disponibles

Source

pub fn by_name(name: &str) -> Self

Obtener tema por nombre

Trait Implementations§

Source§

impl Clone for Theme

Source§

fn clone(&self) -> Theme

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Theme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Theme

§

impl RefUnwindSafe for Theme

§

impl Send for Theme

§

impl Sync for Theme

§

impl Unpin for Theme

§

impl UnsafeUnpin for Theme

§

impl UnwindSafe for Theme

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.