diff options
Diffstat (limited to 'src/colours.rs')
| -rw-r--r-- | src/colours.rs | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/src/colours.rs b/src/colours.rs new file mode 100644 index 0000000..8d69869 --- /dev/null +++ b/src/colours.rs @@ -0,0 +1,86 @@ +use raylib::ffi::Color; + +pub const DEFAULT_COLOURS: Colours = Colours::default(); + +pub struct Colours { + pub deletion_rect: Color, + pub deletion_rect_outline: Color, + pub selection_rect: Color, + pub selection_rect_outline: Color, + pub room_normal: Color, + pub room_selected: Color, + pub wall_normal: Color, + pub wall_selected: Color, + pub icon_normal: Color, + pub icon_selected: Color, +} + +impl Colours { + // NOTE: Unfortunately the default function cannot be made const, since Default is a trait. This + // feature is, as far as I can tell, planned in Rust, but not yet implemented. Once it is, Colours + // should implement Default instead. + const fn default() -> Self { + Self { + deletion_rect: Color { + r: 200, + g: 150, + b: 150, + a: 50, + }, + deletion_rect_outline: Color { + r: 200, + g: 150, + b: 150, + a: 150, + }, + selection_rect: Color { + r: 255, + g: 129, + b: 0, + a: 50, + }, + selection_rect_outline: Color { + r: 255, + g: 129, + b: 0, + a: 150, + }, + room_normal: Color { + r: 180, + g: 180, + b: 180, + a: 255, + }, + room_selected: Color { + r: 150, + g: 200, + b: 150, + a: 255, + }, + wall_normal: Color { + r: 200, + g: 120, + b: 120, + a: 255, + }, + wall_selected: Color { + r: 150, + g: 200, + b: 150, + a: 255, + }, + icon_normal: Color { + r: 255, + g: 255, + b: 255, + a: 255, + }, + icon_selected: Color { + r: 150, + g: 200, + b: 150, + a: 255, + }, + } + } +} |
