aboutsummaryrefslogtreecommitdiff
path: root/src/colours.rs
blob: 8d6986992fef98805b1d42d8b02088b15aaf3c13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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,
            },
        }
    }
}