diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/utils.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs new file mode 100644 index 0000000..55900b0 --- /dev/null +++ b/src/utils.rs | |||
@@ -0,0 +1,32 @@ | |||
1 | use cursive::theme::{BaseColor, Color}; | ||
2 | |||
3 | pub struct AppConfig { | ||
4 | pub true_chr: char, | ||
5 | pub false_chr: char, | ||
6 | pub future_chr: char, | ||
7 | |||
8 | // view dimensions | ||
9 | pub view_width: usize, | ||
10 | pub view_height: usize, | ||
11 | |||
12 | // app dimensions | ||
13 | pub grid_width: usize, | ||
14 | |||
15 | pub reached_color: Color, | ||
16 | pub todo_color: Color, | ||
17 | pub future_color: Color, | ||
18 | } | ||
19 | |||
20 | pub fn load_configuration_file() -> AppConfig { | ||
21 | return AppConfig { | ||
22 | true_chr: '·', | ||
23 | false_chr: '·', | ||
24 | future_chr: '·', | ||
25 | view_width: 25, | ||
26 | view_height: 8, | ||
27 | grid_width: 3, | ||
28 | reached_color: Color::Dark(BaseColor::Cyan), | ||
29 | todo_color: Color::Dark(BaseColor::Magenta), | ||
30 | future_color: Color::Light(BaseColor::Black), | ||
31 | }; | ||
32 | } | ||