Rev 5465 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5465 | leency | 1 | void LoadIniConfig() |
2 | { |
||
3 | debugln(#pixie_ini_path); |
||
4 | ini_get_int stdcall (#pixie_ini_path, "Config", "current_theme", THEME_DARK); |
||
5 | current_theme = EAX; |
||
6 | if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight(); |
||
7 | |||
8 | ini_get_int stdcall (#pixie_ini_path, "Config", "window_mode", WINDOW_MODE_NORMAL); |
||
9 | window_mode = EAX; |
||
10 | |||
11 | ini_get_int stdcall (#pixie_ini_path, "Config", "win_x", 100); |
||
12 | win_x = EAX; |
||
13 | |||
14 | ini_get_int stdcall (#pixie_ini_path, "Config", "win_y", 90); |
||
15 | win_y = EAX; |
||
16 | |||
17 | ini_get_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, sizeof(work_folder), 0); |
||
18 | } |
||
19 | |||
20 | void SaveIniConfig() |
||
21 | { |
||
22 | debugln(#pixie_ini_path); |
||
23 | ini_set_int stdcall (#pixie_ini_path, "Config", "current_theme", current_theme); |
||
24 | ini_set_int stdcall (#pixie_ini_path, "Config", "window_mode", window_mode); |
||
25 | ini_set_int stdcall (#pixie_ini_path, "Config", "win_x", Form.left); |
||
26 | ini_set_int stdcall (#pixie_ini_path, "Config", "win_y", Form.top); |
||
27 | ini_set_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, strlen(#work_folder)); |
||
28 | } |
||
29 | |||
30 | struct struct_pixie_colors { |
||
31 | dword color_top_panel_text, |
||
32 | color_list_bg, |
||
33 | color_list_text, |
||
34 | color_list_active_bg, |
||
35 | color_list_active_text, |
||
36 | color_list_active_pointer, |
||
37 | color_list_scroller, |
||
38 | color_list_border; |
||
39 | } theme; |
||
40 | |||
41 | |||
42 | void SetColorThemeDark() |
||
43 | { |
||
44 | current_theme = THEME_DARK; |
||
5468 | leency | 45 | Libimg_LoadImage(#skin, abspath("s_dark.png")); |
5465 | leency | 46 | skin.w = 300; |
47 | theme.color_top_panel_text = 0xFCFFBE; |
||
48 | theme.color_list_bg = 0x313031; |
||
49 | theme.color_list_text = 0xADAEAD; |
||
50 | theme.color_list_active_bg = 0x434343; |
||
51 | theme.color_list_active_text = 0xADAEAD; |
||
52 | theme.color_list_active_pointer = 0xD6D6D6; |
||
53 | theme.color_list_scroller = 0xBBBbbb; |
||
54 | theme.color_list_border = 0x121212; |
||
55 | scroll1.bckg_col = theme.color_list_bg; |
||
56 | scroll1.frnt_col = theme.color_list_border; |
||
57 | scroll1.line_col = theme.color_list_border; |
||
58 | DrawWindow(); |
||
59 | } |
||
60 | |||
61 | |||
62 | void SetColorThemeLight() |
||
63 | { |
||
64 | current_theme = THEME_LIGHT; |
||
5468 | leency | 65 | Libimg_LoadImage(#skin, abspath("s_light.png")); |
5465 | leency | 66 | skin.w = 300; |
67 | theme.color_top_panel_text = 0x85663F; |
||
68 | theme.color_list_bg = 0xE2E2E2; |
||
69 | theme.color_list_text = 0x595959; |
||
70 | theme.color_list_active_bg = 0xFAF3AF; |
||
71 | theme.color_list_active_text = 0x85663F; |
||
72 | theme.color_list_active_pointer = 0x85663F; |
||
73 | theme.color_list_scroller = 0xBBBbbb; |
||
74 | theme.color_list_border = 0x736D65; |
||
75 | scroll1.bckg_col = theme.color_list_bg; |
||
76 | scroll1.frnt_col = theme.color_list_border; |
||
77 | scroll1.line_col = theme.color_list_border; |
||
78 | DrawWindow(); |
||
79 | } |