Add SAO UI style module

This commit is contained in:
mars 2022-11-18 12:43:23 -07:00
parent 2aadd0d57a
commit f33100cfa8
2 changed files with 29 additions and 0 deletions

View File

@ -7,6 +7,7 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
pub mod anim;
pub mod main_menu;
pub mod music_player;
pub mod style;
pub mod widgets;
use api::*;

View File

@ -0,0 +1,28 @@
use canary_script::Color;
/// A reusable set of colors. Used by default widget styles.
pub struct Palette {
pub base: Color,
pub surface: Color,
pub overlay: Color,
pub text: Color,
}
/// Sword Art Online color palette.
pub const SAO_PALETTE: Palette = Palette {
base: Color::WHITE.with_alpha(0xc0),
surface: Color::WHITE,
overlay: Color::WHITE,
text: Color::BLACK,
};
/// Rose Pine color palette.
pub const ROSE_PINE_PALETTE: Palette = Palette {
base: Color(0x191724ff),
surface: Color(0x1f1d2eff),
overlay: Color(0x26233aff),
text: Color(0xe0def4ff),
};
/// The global palette.
pub const PALETTE: Palette = ROSE_PINE_PALETTE;