1 #include "include/dialogs.h"
2 #include "include/usbld.h"
3 #include "include/dia.h"
4 #include "include/lang.h"
5 #include "include/gui.h"
9 // Dialog definition for IP configuration
10 struct UIItem diaIPConfig
[] = {
11 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_IPCONFIG
}}},
15 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"- PS2 -", -1}}}, {UI_BREAK
},
17 // ---- IP address ----
18 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_IP
}}}, {UI_SPACER
},
20 {UI_INT
, 2, 1, -1, 0, 0, {.intvalue
= {192, 192, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
21 {UI_INT
, 3, 1, -1, 0, 0, {.intvalue
= {168, 168, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
22 {UI_INT
, 4, 1, -1, 0, 0, {.intvalue
= {0, 0, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
23 {UI_INT
, 5, 1, -1, 0, 0, {.intvalue
= {10, 10, 0, 255}}}, {UI_BREAK
},
26 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_MASK
}}}, {UI_SPACER
},
28 {UI_INT
, 6, 1, -1, 0, 0, {.intvalue
= {255, 255, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
29 {UI_INT
, 7, 1, -1, 0, 0, {.intvalue
= {255, 255, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
30 {UI_INT
, 8, 1, -1, 0, 0, {.intvalue
= {255, 255, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
31 {UI_INT
, 9, 1, -1, 0, 0, {.intvalue
= {0, 0, 0, 255}}}, {UI_BREAK
},
34 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_GATEWAY
}}}, {UI_SPACER
},
36 {UI_INT
, 10, 1, -1, 0, 0, {.intvalue
= {192, 192, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
37 {UI_INT
, 11, 1, -1, 0, 0, {.intvalue
= {168, 168, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
38 {UI_INT
, 12, 1, -1, 0, 0, {.intvalue
= {0, 0, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
39 {UI_INT
, 13, 1, -1, 0, 0, {.intvalue
= {1, 1, 0, 255}}},
44 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"- PC -", -1}}}, {UI_BREAK
},
46 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_IP
}}}, {UI_SPACER
},
48 {UI_INT
, 14, 1, -1, 0, 0, {.intvalue
= {192, 192, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
49 {UI_INT
, 15, 1, -1, 0, 0, {.intvalue
= {168, 168, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
50 {UI_INT
, 16, 1, -1, 0, 0, {.intvalue
= {0, 0, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
51 {UI_INT
, 17, 1, -1, 0, 0, {.intvalue
= {1, 1, 0, 255}}}, {UI_BREAK
},
53 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_PORT
}}}, {UI_SPACER
}, {UI_INT
, 18, 1, -1, 0, 0, {.intvalue
= {445, 445, 0, 1024}}}, {UI_BREAK
},
57 // ---- PC share name ----
58 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_SHARE
}}}, {UI_SPACER
}, {UI_STRING
, 19, 1, _STR_HINT_SHARENAME
, 0, 0, {.stringvalue
= {"PS2SMB", "PS2SMB", NULL
}}}, {UI_BREAK
},
59 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_USER
}}}, {UI_SPACER
}, {UI_STRING
, 20, 1, -1, 0, 0, {.stringvalue
= {"GUEST", "GUEST", NULL
}}}, {UI_BREAK
},
60 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_PASSWORD
}}}, {UI_SPACER
}, {UI_PASSWORD
, 21, 1, _STR_HINT_GUEST
, 0, 0, {.stringvalue
= {"", "", NULL
}}},
65 {UI_BUTTON
, NETCFG_OK
, 1, -1, 0, 0, {.label
= {NULL
, -1}}},
67 {UI_SPACER
}, // UIItem #64
69 {UI_BUTTON
, NETCFG_RECONNECT
, 1, -1, 0, 0, {.label
= {NULL
, _STR_RECONNECT
}}},
75 struct UIItem diaCompatConfig
[] = {
76 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_COMPAT_SETTINGS
}}}, {UI_SPACER
},
77 {UI_LABEL
, COMPAT_GAME
, 1, -1, 0, 0, {.label
= {"<Game Label>", -1}}},
81 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_MODE1
}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
, 1, _STR_HINT_MODE1
, -10, 0, {.intvalue
= {0, 0}}}, {UI_SPACER
},
82 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_MODE2
}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 1, 1, _STR_HINT_MODE2
, -10, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
83 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_MODE3
}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 2, 1, _STR_HINT_MODE3
, -10, 0, {.intvalue
= {0, 0}}}, {UI_SPACER
},
84 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_MODE4
}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 3, 1, _STR_HINT_MODE4
, -10, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
85 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_MODE5
}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 4, 1, _STR_HINT_MODE5
, -10, 0, {.intvalue
= {0, 0}}}, {UI_SPACER
},
86 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_MODE6
}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 5, 1, _STR_HINT_MODE6
, -10, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
87 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_MODE7
}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 6, 1, _STR_HINT_MODE7
, -10, 0, {.intvalue
= {0, 0}}}, {UI_SPACER
},
88 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_MODE8
}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 7, 1, _STR_HINT_MODE8
, -10, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
92 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DMA_MODE
}}}, {UI_SPACER
}, {UI_ENUM
, COMPAT_DMA
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
97 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_VMC_SLOT1
}}}, {UI_SPACER
},
99 {UI_BUTTON
, COMPAT_VMC1_DEFINE
, 1, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_SPACER
}, {UI_BUTTON
, COMPAT_VMC1_ACTION
, 1, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_BREAK
},
101 {UI_BUTTON
, COMPAT_VMC1_DEFINE
, 0, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_BREAK
},
103 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_VMC_SLOT2
}}}, {UI_SPACER
},
105 {UI_BUTTON
, COMPAT_VMC2_DEFINE
, 1, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_SPACER
}, {UI_BUTTON
, COMPAT_VMC2_ACTION
, 1, -1, 0, 0, {.label
= {NULL
, -1}}},
107 {UI_BUTTON
, COMPAT_VMC2_DEFINE
, 0, -1, 0, 0, {.label
= {NULL
, -1}}},
113 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_GAME_ID
}}}, {UI_SPACER
}, {UI_STRING
, COMPAT_GAMEID
, 1, -1, 0, 0, {.stringvalue
= {"", "", NULL
}}},
114 {UI_SPACER
}, {UI_BUTTON
, COMPAT_LOADFROMDISC
, 1, -1, 0, 0, {.label
= {NULL
, _STR_LOAD_FROM_DISC
}}},
118 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_ALTSTARTUP
}}}, {UI_SPACER
}, {UI_STRING
, COMPAT_ALTSTARTUP
, 1, -1, 0, 0, {.stringvalue
= {"", "", &guiAltStartupNameHandler
}}},
123 {UI_BUTTON
, COMPAT_SAVE
, 1, -1, 0, 0, {.label
= {NULL
, _STR_SAVE_CHANGES
}}}, {UI_SPACER
},
125 {UI_BUTTON
, COMPAT_TEST
, 1, -1, 0, 0, {.label
= {NULL
, _STR_TEST
}}}, {UI_BREAK
},
130 {UI_BUTTON
, COMPAT_REMOVE
, 1, -1, 0, 0, {.label
= {NULL
, _STR_REMOVE_ALL_SETTINGS
}}},
136 struct UIItem diaConfig
[] = {
137 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_SETTINGS
}}},
140 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DEBUG
}}}, {UI_SPACER
}, {UI_BOOL
, CFG_DEBUG
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
141 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_EXITTO
}}}, {UI_SPACER
}, {UI_STRING
, CFG_EXITTO
, 1, _STR_HINT_EXITPATH
, 0, 0, {.stringvalue
= {"", "", NULL
}}}, {UI_BREAK
},
142 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DANDROP
}}}, {UI_SPACER
}, {UI_BOOL
, CFG_DANDROP
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
143 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_LASTPLAYED
}}}, {UI_SPACER
}, {UI_BOOL
, CFG_LASTPLAYED
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
147 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_CHECKUSBFRAG
}}}, {UI_SPACER
}, {UI_BOOL
, CFG_CHECKUSBFRAG
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
148 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_USB_DELAY
}}}, {UI_SPACER
}, {UI_INT
, CFG_USBDELAY
, 1, -1, 0, 0, {.intvalue
= {3, 3, 0, 99}}}, {UI_BREAK
},
149 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_USB_PREFIX
}}}, {UI_SPACER
}, {UI_STRING
, CFG_USBPREFIX
, 1, -1, 0, 0, {.stringvalue
= {"", "", NULL
}}}, {UI_BREAK
},
150 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_ETH_PREFIX
}}}, {UI_SPACER
}, {UI_STRING
, CFG_ETHPREFIX
, 1, -1, 0, 0, {.stringvalue
= {"", "", NULL
}}}, {UI_BREAK
},
154 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_HDD_SPINDOWN
}}}, {UI_SPACER
}, {UI_INT
, CFG_HDDSPINDOWN
, 1, _STR_HINT_SPINDOWN
, 0, 0, {.intvalue
= {20, 20, 0, 20}}},
158 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_USBMODE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_USBMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
159 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_HDDMODE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_HDDMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
160 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_ETHMODE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_ETHMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
161 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_APPMODE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_APPMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
162 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DEFDEVICE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_DEFDEVICE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
166 {UI_OK
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_OK
}}},
172 struct UIItem diaUIConfig
[] = {
173 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_GFX_SETTINGS
}}},
177 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_THEME
}}}, {UI_SPACER
}, {UI_ENUM
, UICFG_THEME
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
178 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_LANGUAGE
}}}, {UI_SPACER
}, {UI_ENUM
, UICFG_LANG
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
179 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_SCROLLING
}}}, {UI_SPACER
}, {UI_ENUM
, UICFG_SCROLL
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
180 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_AUTOSORT
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_AUTOSORT
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
181 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_AUTOREFRESH
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_AUTOREFRESH
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
182 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_COVERART
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_COVERART
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
183 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_USE_INFO_SCREEN
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_INFOPAGE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
187 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_TXTCOLOR
}}}, {UI_SPACER
}, {UI_COLOUR
, UICFG_TXTCOL
, 1, -1, -10, 17, {.colourvalue
= {0, 0}}}, // UIItem #32
189 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_SELCOLOR
}}}, {UI_SPACER
}, {UI_COLOUR
, UICFG_SELCOL
, 1, -1, -10, 17, {.colourvalue
= {0, 0}}}, // UIItem #36
191 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_UICOLOR
}}}, {UI_SPACER
}, {UI_COLOUR
, UICFG_UICOL
, 1, -1, -10, 17, {.colourvalue
= {0, 0}}}, // UIItem #40
193 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_BGCOLOR
}}}, {UI_SPACER
}, {UI_COLOUR
, UICFG_BGCOL
, 1, -1, -10, 17, {.colourvalue
= {0, 0}}}, // UIItem #44
198 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_VMODE
}}}, {UI_SPACER
}, {UI_ENUM
, UICFG_VMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
199 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_VSYNC
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_VSYNC
, 1, -1, 0, 0, {.intvalue
= {1, 1}}}, {UI_BREAK
},
200 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_WIDE_SCREEN
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_WIDESCREEN
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
204 {UI_OK
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_OK
}}},
210 struct UIItem diaAbout
[] = {
211 {UI_LABEL
, 1, 1, -1, 0, 0, {.label
= {NULL
, -1}}},
215 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DEVS
}}}, {UI_BREAK
},
219 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"crazyc", -1}}}, {UI_BREAK
},
220 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"ifcaro", -1}}}, {UI_BREAK
},
221 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"izdubar", -1}}}, {UI_BREAK
},
222 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"jimmikaelkael", -1}}}, {UI_BREAK
},
223 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"Polo35", -1}}}, {UI_BREAK
},
224 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"volca", -1}}}, {UI_BREAK
},
228 {UI_OK
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_OK
}}},
235 struct UIItem diaVMC
[] = {
236 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_VMC_SCREEN
}}},
240 {UI_LABEL
, 0, 1, -1, -15, 0, {.label
= {NULL
, _STR_VMC_NAME
}}}, {UI_SPACER
}, {UI_STRING
, VMC_NAME
, 1, -1, 0, 0, {.stringvalue
= {"", "", &guiVmcNameHandler
}}}, {UI_BREAK
},
241 {UI_LABEL
, 0, 1, -1, -15, 0, {.label
= {NULL
, _STR_VMC_SIZE
}}}, {UI_SPACER
}, {UI_ENUM
, VMC_SIZE
, 1, _STR_HINT_VMC_SIZE
, 0, 0, {.intvalue
= {0, 0}}},
245 {UI_LABEL
, 0, 1, -1, -15, 0, {.label
= {NULL
, _STR_VMC_STATUS
}}}, {UI_SPACER
}, {UI_LABEL
, VMC_STATUS
, 0, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_BREAK
},
246 {UI_LABEL
, 0, 1, -1, -15, 0, {.label
= {NULL
, _STR_VMC_PROGRESS
}}}, {UI_SPACER
}, {UI_INT
, VMC_PROGRESS
, 0, -1, 0, 0, {.intvalue
= {0, 0, 0, 100}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"%", -1}}},
250 {UI_BUTTON
, VMC_BUTTON_CREATE
, 1, -1, 0, 0, {.label
= {NULL
, -1}}},
252 {UI_SPLITTER
}, // UIItem #20
254 {UI_BUTTON
, VMC_BUTTON_DELETE
, 1, -1, 0, 0, {.label
= {NULL
, _STR_DELETE
}}},