59 lines
1.4 KiB
Rust
59 lines
1.4 KiB
Rust
//! Program constants & defaults
|
|
|
|
use bevy::{
|
|
color::palettes::{css::*, tailwind::SLATE_100},
|
|
prelude::*,
|
|
};
|
|
|
|
#[derive(Debug, Reflect, Resource)]
|
|
#[reflect(Resource)]
|
|
pub struct UiTheme {
|
|
// Colors for the machine UI panes
|
|
// (and others, but we're not there yet)
|
|
pub pane_bg: Color,
|
|
|
|
// Colors for the "Big Red Buttons" (the main actions of the machines)
|
|
// normal
|
|
pub brb_bg: Color,
|
|
pub brb_border: Color,
|
|
// hover
|
|
pub brb_hover_bg: Color,
|
|
pub brb_hover_border: Color,
|
|
// pressed
|
|
pub brb_pressed_bg: Color,
|
|
pub brb_pressed_border: Color,
|
|
|
|
// Colors for low-priority buttons
|
|
// normal
|
|
pub quiet_bg: Color,
|
|
pub quiet_border: Color,
|
|
// hover
|
|
pub quiet_hover_bg: Color,
|
|
pub quiet_hover_border: Color,
|
|
// pressed
|
|
pub quiet_pressed_bg: Color,
|
|
pub quiet_pressed_border: Color,
|
|
}
|
|
|
|
impl FromWorld for UiTheme {
|
|
fn from_world(_world: &mut World) -> Self {
|
|
Self {
|
|
pane_bg: SLATE_100.into(),
|
|
|
|
brb_bg: RED.into(),
|
|
brb_border: DARK_RED.into(),
|
|
brb_hover_bg: PINK.into(),
|
|
brb_hover_border: RED.into(),
|
|
brb_pressed_bg: GREEN.into(),
|
|
brb_pressed_border: DARK_GREEN.into(),
|
|
|
|
quiet_bg: GRAY.into(),
|
|
quiet_border: DARK_GRAY.into(),
|
|
quiet_hover_bg: DARK_GRAY.into(),
|
|
quiet_hover_border: LIGHT_GRAY.into(),
|
|
quiet_pressed_bg: LIGHT_GRAY.into(),
|
|
quiet_pressed_border: GRAY.into(),
|
|
}
|
|
}
|
|
}
|