Rev 5468 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5468 | Rev 5509 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | void LoadIniConfig() |
1 | void LoadIniConfig() |
2 | { |
2 | { |
3 | debugln(#pixie_ini_path); |
- | |
4 | ini_get_int stdcall (#pixie_ini_path, "Config", "current_theme", THEME_DARK); |
3 | ini_get_int stdcall (#pixie_ini_path, "Config", "current_theme", THEME_DARK); current_theme = EAX; |
5 | current_theme = EAX; |
4 | ini_get_int stdcall (#pixie_ini_path, "Config", "window_mode", WINDOW_MODE_NORMAL); window_mode = EAX; |
6 | if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight(); |
5 | ini_get_int stdcall (#pixie_ini_path, "Config", "win_x_normal", 100); win_x_normal = EAX; |
7 | - | ||
8 | ini_get_int stdcall (#pixie_ini_path, "Config", "window_mode", WINDOW_MODE_NORMAL); |
6 | ini_get_int stdcall (#pixie_ini_path, "Config", "win_y_normal", 90); win_y_normal = EAX; |
9 | window_mode = EAX; |
- | |
10 | - | ||
11 | ini_get_int stdcall (#pixie_ini_path, "Config", "win_x", 100); |
7 | ini_get_int stdcall (#pixie_ini_path, "Config", "win_x_small", -1); win_x_small = EAX; |
12 | win_x = EAX; |
- | |
13 | - | ||
14 | ini_get_int stdcall (#pixie_ini_path, "Config", "win_y", 90); |
8 | ini_get_int stdcall (#pixie_ini_path, "Config", "win_y_small", -1); win_y_small = EAX; |
15 | win_y = EAX; |
- | |
16 | - | ||
17 | ini_get_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, sizeof(work_folder), 0); |
9 | ini_get_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, sizeof(work_folder), 0); |
- | 10 | ||
- | 11 | if (current_theme == THEME_DARK) SetColorThemeDark(); else SetColorThemeLight(); |
|
- | 12 | if (win_x_small==-1) win_x_small = 2000; |
|
- | 13 | if (win_y_small==-1) win_y_small = GetClientHeight() - skin.h + 1; |
|
18 | } |
14 | } |
Line 19... | Line 15... | ||
19 | 15 | ||
20 | void SaveIniConfig() |
16 | void SaveIniConfig() |
- | 17 | { |
|
- | 18 | if (window_mode == WINDOW_MODE_NORMAL) |
|
- | 19 | { |
|
21 | { |
20 | win_x_normal = Form.left; |
- | 21 | win_y_normal = Form.top; |
|
- | 22 | } |
|
- | 23 | if (window_mode == WINDOW_MODE_SMALL) |
|
- | 24 | { |
|
- | 25 | win_x_small = Form.left; |
|
- | 26 | win_y_small = Form.top; |
|
22 | debugln(#pixie_ini_path); |
27 | } |
23 | ini_set_int stdcall (#pixie_ini_path, "Config", "current_theme", current_theme); |
28 | ini_set_int stdcall (#pixie_ini_path, "Config", "current_theme", current_theme); |
- | 29 | ini_set_int stdcall (#pixie_ini_path, "Config", "window_mode", window_mode); |
|
- | 30 | ini_set_int stdcall (#pixie_ini_path, "Config", "win_x_normal", win_x_normal); |
|
24 | ini_set_int stdcall (#pixie_ini_path, "Config", "window_mode", window_mode); |
31 | ini_set_int stdcall (#pixie_ini_path, "Config", "win_y_normal", win_y_normal); |
25 | ini_set_int stdcall (#pixie_ini_path, "Config", "win_x", Form.left); |
32 | ini_set_int stdcall (#pixie_ini_path, "Config", "win_x_small", win_x_small); |
26 | ini_set_int stdcall (#pixie_ini_path, "Config", "win_y", Form.top); |
33 | ini_set_int stdcall (#pixie_ini_path, "Config", "win_y_small", win_y_small); |
27 | ini_set_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, strlen(#work_folder)); |
34 | ini_set_str stdcall (#pixie_ini_path, "Config", "last_folder", #work_folder, strlen(#work_folder)); |
Line 28... | Line 35... | ||
28 | } |
35 | } |
29 | 36 |