Rev 5753 | Rev 5767 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5753 | Rev 5761 | ||
---|---|---|---|
Line 25... | Line 25... | ||
25 | 25 | ||
Line 26... | Line 26... | ||
26 | void settings_dialog() |
26 | void settings_dialog() |
27 | { |
27 | { |
28 | byte id; |
28 | byte id; |
29 | - | ||
- | 29 | active_settings=1; |
|
30 | loop(){ |
30 | loop(){ |
31 | switch(WaitEvent()) |
31 | switch(WaitEvent()) |
32 | { |
32 | { |
33 | case evButton: |
33 | case evButton: |
34 | id=GetButtonID(); |
34 | id=GetButtonID(); |
35 | if (id==1) ExitSettings(); |
35 | if (id==1) { ExitSettings(); break; } |
36 | else if (id==5) |
36 | else if (id==5) |
37 | { |
37 | { |
38 | RunProgram("tinypad", "/sys/settings/assoc.ini"); |
38 | RunProgram("tinypad", "/sys/settings/assoc.ini"); |
39 | break; |
39 | break; |
40 | } |
40 | } |
Line 45... | Line 45... | ||
45 | else if (id==25) files.line_h++; |
45 | else if (id==25) files.line_h++; |
46 | else if (id==26) && (files.line_h>18) files.line_h--; |
46 | else if (id==26) && (files.line_h>18) files.line_h--; |
47 | else if (id==27) MOUSE_TIME++; |
47 | else if (id==27) MOUSE_TIME++; |
48 | else if (id==28) && (MOUSE_TIME>29) MOUSE_TIME--; |
48 | else if (id==28) && (MOUSE_TIME>29) MOUSE_TIME--; |
49 | else if (id==30) && (font.size.text<22) { font.size.text++; BigFontsChange(); } |
49 | else if (id==30) { font.size.text++; IF(!font.changeSIZE()) font.size.text--; BigFontsChange(); } |
50 | else if (id==31) && (font.size.text>9) { font.size.text--; BigFontsChange(); } |
50 | else if (id==31) { font.size.text--; IF(!font.changeSIZE()) font.size.text++; BigFontsChange(); } |
51 | SaveIniSettings(); |
51 | EventRedrawWindow(Form.left,Form.top); |
52 | EventRedrawWindow(Form.left,Form.top); |
- | |
53 | DrawSettingsCheckBoxes(); |
52 | DrawSettingsCheckBoxes(); |
54 | break; |
53 | break; |
55 | 54 | ||
Line 56... | Line 55... | ||
56 | case evKey: |
55 | case evKey: |
Line 70... | Line 69... | ||
70 | { |
69 | { |
71 | active_settings=0; |
70 | active_settings = 0; |
72 | settings_window = 0; |
71 | settings_window = 0; |
73 | cmd_free = 4; |
72 | cmd_free = 4; |
74 | SaveIniSettings(); |
73 | ExitProcess(); |
75 | ExitProcess(); |
- | |
76 | } |
74 | } |
77 | 75 | ||
Line 78... | Line 76... | ||
78 | void DrawSettingsCheckBoxes() |
76 | void DrawSettingsCheckBoxes() |
79 | { |
77 | { |
Line 101... | Line 99... | ||
101 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinY", 50); WinY = EAX; |
99 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinY", 50); WinY = EAX; |
102 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinW", 550); WinW = EAX; |
100 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinW", 550); WinW = EAX; |
103 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinH", 500); WinH = EAX; |
101 | ini_get_int stdcall (eolite_ini_path, #config_section, "WinH", 500); WinH = EAX; |
104 | BigFontsChange(); |
102 | BigFontsChange(); |
105 | } |
103 | files.SetFont(6, 6, 10000000b); |
- | 104 | FileShow.font_size_x = files.font_w; |
|
- | 105 | FileShow.font_number = 0; |
|
- | 106 | } |
|
106 | 107 | ||
Line 107... | Line 108... | ||
107 | 108 | ||
108 | void SaveIniSettings() |
109 | void SaveIniSettings() |
Line 150... | Line 151... | ||
150 | { |
151 | { |
151 | files.line_h = font.height + 4; |
152 | files.line_h = font.height + 4; |
152 | if (files.line_h<18) files.line_h = 18; |
153 | if (files.line_h<18) files.line_h = 18; |
153 | files_active.line_h = files_inactive.line_h = files.line_h; |
154 | files_active.line_h = files_inactive.line_h = files.line_h; |
154 | 155 | } |
|
155 | files.SetFont(6, 6, 10000000b); |
- | |
156 | FileShow.font_size_x = files.font_w; |
- | |
157 | FileShow.font_number = 0; |
- | |
158 | } |
- | |
159 | 156 | ||
Line 160... | Line 157... | ||
160 | 157 | ||
161 | void CheckBox2(dword x, y, id, text, byte value) { |
158 | void CheckBox2(dword x, y, id, text, byte value) { |