pub enum EngineColor {
Text,
TextDim,
Panel,
Border,
Highlight,
Warning,
Focus,
Background,
Accent,
Bright,
}Expand description
The colors the engine’s own widgets ask for. A game’s ColorSet says
which of its palette’s names each one is
(engine_name).
Variants§
Text
Text.
TextDim
Text that matters less: hints, what can’t be picked.
Panel
A panel’s background.
Border
A panel’s border.
Highlight
What the player has picked or is on.
Warning
Something going wrong.
Focus
The border of what has the focus, and the bar of a focused item.
Background
Behind everything: the screen around the panels.
Accent
What stands apart from the rest of a highlight: the keys that move the cursor, say.
Bright
Brighter than text: what just changed.
Implementations§
Source§impl EngineColor
impl EngineColor
Sourcepub const ALL: &[EngineColor]
pub const ALL: &[EngineColor]
Every engine color.
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
Its name, which is the palette’s name for it unless the game’s
ColorSet::engine_name says otherwise.
Trait Implementations§
Source§impl Clone for EngineColor
impl Clone for EngineColor
Source§fn clone(&self) -> EngineColor
fn clone(&self) -> EngineColor
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 ColorSet for EngineColor
The engine’s own colors as a set: for a palette with nothing more than
the engine’s names.
impl ColorSet for EngineColor
The engine’s own colors as a set: for a palette with nothing more than the engine’s names.
Source§fn engine_name(color: EngineColor) -> &'static str
fn engine_name(color: EngineColor) -> &'static str
The palette’s name for an engine color. By default its own
(
EngineColor::name), so the palette must have text, panel
and the rest; a game whose palette calls them otherwise says so here.impl Copy for EngineColor
Source§impl Debug for EngineColor
impl Debug for EngineColor
impl Eq for EngineColor
Source§impl Hash for EngineColor
impl Hash for EngineColor
Source§impl PartialEq for EngineColor
impl PartialEq for EngineColor
impl StructuralPartialEq for EngineColor
Auto Trait Implementations§
impl Freeze for EngineColor
impl RefUnwindSafe for EngineColor
impl Send for EngineColor
impl Sync for EngineColor
impl Unpin for EngineColor
impl UnsafeUnpin for EngineColor
impl UnwindSafe for EngineColor
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