1 |
/* |
2 |
* dlgAdvanced.cpp - SDL GUI dialog for C64 advanced options |
3 |
* |
4 |
* (C) 2006 Bernd Lachner |
5 |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
8 |
* the Free Software Foundation; either version 2 of the License, or |
9 |
* (at your option) any later version. |
10 |
* |
11 |
* This program is distributed in the hope that it will be useful, |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
* GNU General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
*/ |
20 |
|
21 |
#include "sysdeps.h" |
22 |
#include "sdlgui.h" |
23 |
|
24 |
#include "Prefs.h" |
25 |
|
26 |
enum ADVANCEDDLG { |
27 |
box_main, |
28 |
box_timing, |
29 |
text_timing, |
30 |
text_line_cpu, |
31 |
LINE_CPU, |
32 |
LINE_UP_CPU, |
33 |
LINE_DOWN_CPU, |
34 |
text_bad_line_cpu, |
35 |
BAD_LINE_CPU, |
36 |
BAD_LINE_UP_CPU, |
37 |
BAD_LINE_DOWN_CPU, |
38 |
text_line_cia, |
39 |
LINE_CIA, |
40 |
LINE_UP_CIA, |
41 |
LINE_DOWN_CIA, |
42 |
text_line_1541, |
43 |
LINE_1541, |
44 |
LINE_UP_1541, |
45 |
LINE_DOWN_1541, |
46 |
box_advancedoptions, |
47 |
text_advancedoptions, |
48 |
CLEAR_CIA_ICR, |
49 |
OK, |
50 |
CANCEL |
51 |
}; |
52 |
|
53 |
static char Cycles[4][4]; |
54 |
|
55 |
/* The keyboard dialog: */ |
56 |
/* Spalte, Zeile, Länge, Höhe*/ |
57 |
static SGOBJ advanceddlg[] = |
58 |
{ |
59 |
{ SGBOX, SG_BACKGROUND, 0, 0,0, 35,20, NULL }, |
60 |
{ SGBOX, 0, 0, 1,2, 33,9, NULL }, |
61 |
{ SGTEXT, 0, 0, 2, 1, 16, 1, " Timing Control"}, |
62 |
|
63 |
{ SGTEXT, 0, 0, 2, 3, 16, 1, "Cycles / Line (CPU):"}, |
64 |
{ SGEDITFIELD, 0, 0, 26, 3, sizeof(Cycles[0])-1, 1, Cycles[0]}, |
65 |
{ SGBUTTON, SG_SELECTABLE | SG_TOUCHEXIT, 0, 30, 3, 1, 1, "\x01"}, |
66 |
/* Arrow up */ |
67 |
{ SGBUTTON, SG_SELECTABLE | SG_TOUCHEXIT, 0, 32, 3, 1, 1, "\x02"}, |
68 |
/* Arrow down */ |
69 |
|
70 |
{ SGTEXT, 0, 0, 2, 5, 16, 1, "Cycles / bad line (CPU):"}, |
71 |
{ SGEDITFIELD, 0, 0, 26, 5, sizeof(Cycles[1])-1, 1, Cycles[1]}, |
72 |
{ SGBUTTON, SG_SELECTABLE | SG_TOUCHEXIT, 0, 30, 5, 1, 1, "\x01"}, |
73 |
/* Arrow up */ |
74 |
{ SGBUTTON, SG_SELECTABLE | SG_TOUCHEXIT, 0, 32, 5, 1, 1, "\x02"}, |
75 |
/* Arrow down */ |
76 |
|
77 |
{ SGTEXT, 0, 0, 2, 7, 16, 1, "Cycles / Line (CIA):"}, |
78 |
{ SGEDITFIELD, 0, 0, 26, 7, sizeof(Cycles[2])-1, 1, Cycles[2]}, |
79 |
{ SGBUTTON, SG_SELECTABLE | SG_TOUCHEXIT, 0, 30, 7, 1, 1, "\x01"}, |
80 |
/* Arrow up */ |
81 |
{ SGBUTTON, SG_SELECTABLE | SG_TOUCHEXIT, 0, 32, 7, 1, 1, "\x02"}, |
82 |
/* Arrow down */ |
83 |
|
84 |
{ SGTEXT, 0, 0, 2, 9, 16, 1, "Cycles / Line (1541):"}, |
85 |
{ SGEDITFIELD, 0, 0, 26, 9, sizeof(Cycles[3])-1, 1, Cycles[3]}, |
86 |
{ SGBUTTON, SG_SELECTABLE | SG_TOUCHEXIT, 0, 30, 9, 1, 1, "\x01"}, |
87 |
/* Arrow up */ |
88 |
{ SGBUTTON, SG_SELECTABLE | SG_TOUCHEXIT, 0, 32, 9, 1, 1, "\x02"}, |
89 |
/* Arrow down */ |
90 |
|
91 |
{ SGBOX, 0, 0, 1,13, 33,3, NULL }, |
92 |
{ SGTEXT, 0, 0, 2, 12, 22, 1, " Advanced Options"}, |
93 |
{ SGCHECKBOX, SG_SELECTABLE, 0, 2, 14, 30, 1, "Clear CIA ICR on Write Access"}, |
94 |
|
95 |
{ SGBUTTON, SG_SELECTABLE|SG_EXIT|SG_DEFAULT, 0, 1, 18, 6, 1, "OK"}, |
96 |
{ SGBUTTON, SG_SELECTABLE|SG_EXIT, 0, 9, 18, 6, 1, "Cancel"}, |
97 |
|
98 |
{ -1, 0, 0, 0,0, 0,0, NULL } |
99 |
}; |
100 |
|
101 |
void Dialog_Advanced(Prefs &prefs) |
102 |
{ |
103 |
switch (SDLGui_DoDialog(advanceddlg)) |
104 |
{ |
105 |
} |
106 |
} |
107 |
|