31 sectionDisplayNames_ = {
32 {
"TableMetadata",
"Table matching & metadata (source, indexing)"},
33 {
"TitleDisplay",
"On-screen titles & wheel (font, position)"},
34 {
"UIWidgets",
"UI elements (arrows, scrollbars, visuals)"},
35 {
"AudioSettings",
"Global audio levels and mutes"},
36 {
"Keybinds",
"Keyboard / Controller shortcuts"},
37 {
"DPISettings",
"Display scale / DPI behavior"},
38 {
"WindowSettings",
"Window & placement settings"},
39 {
"MediaDimensions",
"Media sizing & placement for each window"},
40 {
"CustomMedia",
"Per-table custom media paths"},
41 {
"VPX",
"VPX integration paths & launch options"},
42 {
"DefaultMedia",
"Fallback default media (used when table media missing)"},
43 {
"UISounds",
"Interface sound effects"},
44 {
"Internal",
"Advanced / internal settings (indexes, DB paths)"}
47 keyOrders_[
"TableMetadata"] = {
53 "forceRebuildMetadata",
61 keyDisplayNames_[
"TableMetadata"] = {
62 {
"titleSource",
"Title Source"},
63 {
"titleSortBy",
"Sort By"},
64 {
"useVpxtool",
"Enable VPXTool"},
65 {
"fetchVPSdb",
"Use VPS DB"},
66 {
"ignoreScanners",
"Fast load (skip scanners)"},
67 {
"forceRebuildMetadata",
"Force rebuild metadata"},
68 {
"titleWeight",
"Title weight"},
69 {
"yearWeight",
"Year weight"},
70 {
"manufacturerWeight",
"Manufacturer weight"},
71 {
"romWeight",
"ROM weight"},
72 {
"titleThreshold",
"Title similarity"},
73 {
"confidenceThreshold",
"Overall confidence"}
75 keyDropdownOptions_[
"TableMetadata"] = {
76 {
"titleSource", {
"filename",
"metadata"}},
77 {
"titleSortBy", {
"title",
"author",
"type",
"year",
"manufacturer"}}
80 keyOrders_[
"TitleDisplay"] = {
92 keyDisplayNames_[
"TitleDisplay"] = {
93 {
"showWheel",
"Show wheel"},
94 {
"wheelWindow",
"Wheel window"},
95 {
"showTitle",
"Show title"},
96 {
"titleWindow",
"Title window"},
97 {
"fontPath",
"Font path"},
98 {
"fontColor",
"Font color"},
99 {
"fontBgColor",
"Font BG color"},
100 {
"fontSize",
"Font size"},
101 {
"titleX",
"Title X"},
102 {
"titleY",
"Title Y"}
104 keyDropdownOptions_[
"TitleDisplay"] = {
105 {
"wheelWindow", {
"playfield",
"backglass",
"dmd",
"topper"}},
106 {
"titleWindow", {
"playfield",
"backglass",
"dmd",
"topper"}}
109 keyOrders_[
"UIWidgets"] = {
111 "metadataPanelWidth",
112 "metadataPanelHeight",
113 "metadataPanelAlpha",
128 "scrollbarThumbColor"
130 keyDisplayNames_[
"UIWidgets"] = {
131 {
"showMetadata",
"Display Metadata"},
132 {
"metadataPanelWidth",
"Panel Width"},
133 {
"metadataPanelHeight",
"Panel Height"},
134 {
"metadataPanelAlpha",
"Panel Opacity"},
135 {
"showArrowHint",
"Show arrow hint"},
136 {
"arrowHintWidth",
"Arrow width"},
137 {
"arrowHintHeight",
"Arrow height"},
138 {
"arrowThickness",
"Arrow thickness"},
139 {
"arrowAlpha",
"Arrow opacity"},
140 {
"arrowColorTop",
"Arrow color (top)"},
141 {
"arrowColorBottom",
"Arrow color (bottom)"},
142 {
"arrowGlow",
"Arrow glow"},
143 {
"arrowGlowColor",
"Glow color"},
144 {
"showScrollbar",
"Show scrollbar"},
145 {
"scrollbarWidth",
"Scrollbar width"},
146 {
"thumbWidth",
"Thumb width"},
147 {
"scrollbarLength",
"Scrollbar length"},
148 {
"scrollbarColor",
"Scrollbar color"},
149 {
"scrollbarThumbColor",
"Scrollbar thumb color"}
152 keyOrders_[
"AudioSettings"] = {
160 "interfaceAudioMute",
161 "interfaceAmbienceVol",
162 "interfaceAmbienceMute"
164 keyDisplayNames_[
"AudioSettings"] = {
165 {
"masterVol",
"Master volume"},
166 {
"masterMute",
"Master mute"},
167 {
"mediaAudioVol",
"Media volume"},
168 {
"mediaAudioMute",
"Media mute"},
169 {
"tableMusicVol",
"Table music vol"},
170 {
"tableMusicMute",
"Table music mute"},
171 {
"interfaceAudioVol",
"Interface volume"},
172 {
"interfaceAudioMute",
"Interface mute"},
173 {
"interfaceAmbienceVol",
"Ambience volume"},
174 {
"interfaceAmbienceMute",
"Ambience mute"}
177 keyOrders_[
"Keybinds"] = {
178 "Previous Table",
"Next Table",
"Fast Previous Table",
"Fast Next Table",
179 "Jump Next Letter",
"Jump Previous Letter",
"Random Table",
"Launch Table",
180 "Toggle Config",
"Toggle Editor",
"Toggle Catalog",
"Screenshot Mode",
181 "Screenshot Key",
"Screenshot Quit",
"Quit"
183 keyDisplayNames_[
"Keybinds"] = {
184 {
"Previous Table",
"Previous Table"},
185 {
"Next Table",
"Next Table"},
186 {
"Fast Previous Table",
"Fast Previous Table"},
187 {
"Fast Next Table",
"Fast Next Table"},
188 {
"Jump Next Letter",
"Jump Next Letter"},
189 {
"Jump Previous Letter",
"Jump Previous Letter"},
190 {
"Random Table",
"Random Table"},
191 {
"Launch Table",
"Launch Table"},
192 {
"Screenshot Mode",
"Screenshot Mode"},
193 {
"Screenshot Key",
"Screenshot Key"},
194 {
"Screenshot Quit",
"Screenshot Quit"},
195 {
"Toggle Config",
"Toggle Config"},
196 {
"Toggle Editor",
"Toggle Editor"},
197 {
"Toggle Catalog",
"Toggle Catalog"},
201 keyOrders_[
"DPISettings"] = {
205 keyDisplayNames_[
"DPISettings"] = {
206 {
"dpiScale",
"DPI scale"},
207 {
"enableDpiScaling",
"Enable DPI scaling"}
210 keyOrders_[
"WindowSettings"] = {
213 "playfieldWindowWidth",
214 "playfieldWindowHeight",
218 "backglassWindowWidth",
219 "backglassWindowHeight",
229 "topperWindowHeight",
233 keyDisplayNames_[
"WindowSettings"] = {
234 {
"videoBackend",
"Video backend"},
235 {
"useVPinballXIni",
"Use VPX INI"},
236 {
"playfieldWindowWidth",
"Playfield width"},
237 {
"playfieldWindowHeight",
"Playfield height"},
238 {
"playfieldX",
"Playfield X"},
239 {
"playfieldY",
"Playfield Y"},
240 {
"showBackglass",
"Show backglass"},
241 {
"backglassWindowWidth",
"Backglass width"},
242 {
"backglassWindowHeight",
"Backglass height"},
243 {
"backglassX",
"Backglass X"},
244 {
"backglassY",
"Backglass Y"},
245 {
"showDMD",
"Show DMD"},
246 {
"dmdWindowWidth",
"DMD width"},
247 {
"dmdWindowHeight",
"DMD height"},
250 {
"showTopper",
"Show topper"},
251 {
"topperWindowWidth",
"Topper width"},
252 {
"topperWindowHeight",
"Topper height"},
253 {
"topperWindowX",
"Topper X"},
254 {
"topperWindowY",
"Topper Y"}
256 keyDropdownOptions_[
"WindowSettings"] = {
257 {
"videoBackend", {
"vlc",
"ffmpeg",
"novideo",
"software"}}
260 keyOrders_[
"MediaDimensions"] = {
268 "playfieldMediaWidth",
269 "playfieldMediaHeight",
273 "backglassMediaWidth",
274 "backglassMediaHeight",
289 keyDisplayNames_[
"MediaDimensions"] = {
290 {
"fetchVpinMediaDb",
"Use VPinMedia DB"},
291 {
"resizeToWindows",
"Resize media to window"},
292 {
"forceImagesOnly",
"Force images only"},
293 {
"wheelMediaWidth",
"Wheel width"},
294 {
"wheelMediaHeight",
"Wheel height"},
295 {
"wheelMediaX",
"Wheel X"},
296 {
"wheelMediaY",
"Wheel Y"},
297 {
"playfieldMediaWidth",
"Playfield media width"},
298 {
"playfieldMediaHeight",
"Playfield media height"},
299 {
"playfieldMediaX",
"Playfield media X"},
300 {
"playfieldMediaY",
"Playfield media Y"},
301 {
"playfieldRotation",
"Playfield rotation"},
302 {
"backglassMediaWidth",
"Backglass media width"},
303 {
"backglassMediaHeight",
"Backglass media height"},
304 {
"backglassMediaX",
"Backglass media X"},
305 {
"backglassMediaY",
"Backglass media Y"},
306 {
"backglassRotation",
"Backglass rotation"},
307 {
"dmdMediaWidth",
"DMD media width"},
308 {
"dmdMediaHeight",
"DMD media height"},
309 {
"dmdMediaX",
"DMD media X"},
310 {
"dmdMediaY",
"DMD media Y"},
311 {
"dmdRotation",
"DMD rotation"},
312 {
"topperMediaWidth",
"Topper media width"},
313 {
"topperMediaHeight",
"Topper media height"},
314 {
"topperMediaX",
"Topper media X"},
315 {
"topperMediaY",
"Topper media Y"},
316 {
"topperRotation",
"Topper rotation"}
319 keyOrders_[
"CustomMedia"] = {
321 "customPlayfieldImage",
322 "customBackglassImage",
325 "customPlayfieldVideo",
326 "customBackglassVideo",
332 keyDisplayNames_[
"CustomMedia"] = {
333 {
"customWheelImage",
"Wheel image"},
334 {
"customPlayfieldImage",
"Playfield image"},
335 {
"customBackglassImage",
"Backglass image"},
336 {
"customDmdImage",
"DMD image"},
337 {
"customTopperImage",
"Topper image"},
338 {
"customPlayfieldVideo",
"Playfield video"},
339 {
"customBackglassVideo",
"Backglass video"},
340 {
"customDmdVideo",
"DMD video"},
341 {
"customTopperVideo",
"Topper video"},
342 {
"tableMusic",
"Table music"},
343 {
"customLaunchSound",
"Launch sound"}
346 keyOrders_[
"VPX"] = {
354 keyDisplayNames_[
"VPX"] = {
355 {
"VPXTablesPath",
"VPX Tables Path"},
356 {
"VPinballXPath",
"VPinballX Path"},
357 {
"vpxIniPath",
"VPX INI Path"},
358 {
"vpxStartArgs",
"VPX Start Arguments"},
359 {
"vpxEndArgs",
"VPX End Arguments"},
360 {
"autoPatchTables",
"Automatically Patch Tables"}
363 keyOrders_[
"DefaultMedia"] = {
365 "defaultPlayfieldImage",
366 "defaultBackglassImage",
368 "defaultTopperImage",
369 "defaultPlayfieldVideo",
370 "defaultBackglassVideo",
374 keyDisplayNames_[
"DefaultMedia"] = {
375 {
"defaultWheelImage",
"Default wheel image"},
376 {
"defaultPlayfieldImage",
"Default playfield image"},
377 {
"defaultBackglassImage",
"Default backglass image"},
378 {
"defaultDmdImage",
"Default DMD image"},
379 {
"defaultTopperImage",
"Default topper image"},
380 {
"defaultPlayfieldVideo",
"Default playfield video"},
381 {
"defaultBackglassVideo",
"Default backglass video"},
382 {
"defaultDmdVideo",
"Default DMD video"},
383 {
"defaultTopperVideo",
"Default topper video"}
386 keyOrders_[
"UISounds"] = {
392 "launchScreenshotSound",
394 "screenshotTakeSound",
397 keyDisplayNames_[
"UISounds"] = {
398 {
"scrollNormalSound",
"Scroll (normal)"},
399 {
"scrollFastSound",
"Scroll (fast)"},
400 {
"scrollJumpSound",
"Scroll (jump)"},
401 {
"scrollRandomSound",
"Scroll (random)"},
402 {
"launchTableSound",
"Launch table"},
403 {
"launchScreenshotSound",
"Launch screenshot"},
404 {
"panelToggleSound",
"Panel toggle"},
405 {
"screenshotTakeSound",
"Screenshot take"},
406 {
"ambienceSound",
"Ambience"}
409 keyOrders_[
"Internal"] = {
412 "vpsDbUpdateFrequency",
418 keyDisplayNames_[
"Internal"] = {
419 {
"vpxSubCmd",
"VPX Subcommand"},
420 {
"vpsDbPath",
"VPS Database Path"},
421 {
"vpsDbUpdateFrequency",
"VPS Database Update Frequency"},
422 {
"vpsDbLastUpdated",
"VPS Database Last Updated"},
423 {
"vpxtoolIndex",
"VPX Tool Index"},
424 {
"indexPath",
"Index Path"},
425 {
"screenshotWait",
"Screenshot Wait Time"}
429 const std::vector<std::string>& getSectionOrder()
const {
return sectionOrder_; }
430 const std::vector<std::string>& getKeyOrder(
const std::string& sectionName)
const {
431 static const std::vector<std::string> empty;
432 auto it = keyOrders_.find(sectionName);
433 return it != keyOrders_.end() ? it->second : empty;
435 std::string getSectionDisplayName(
const std::string& sectionName)
const {
436 auto it = sectionDisplayNames_.find(sectionName);
437 return it != sectionDisplayNames_.end() ? it->second : sectionName;
439 std::string getKeyDisplayName(
const std::string& sectionName,
const std::string& key)
const {
440 auto sectionIt = keyDisplayNames_.find(sectionName);
441 if (sectionIt != keyDisplayNames_.end()) {
442 auto keyIt = sectionIt->second.find(key);
443 if (keyIt != sectionIt->second.end()) {
444 return keyIt->second;
449 const std::vector<std::string>& getDropdownOptions(
const std::string& sectionName,
const std::string& key)
const {
450 static const std::vector<std::string> empty;
451 auto sectionIt = keyDropdownOptions_.find(sectionName);
452 if (sectionIt != keyDropdownOptions_.end()) {
453 auto keyIt = sectionIt->second.find(key);
454 if (keyIt != sectionIt->second.end()) {
455 return keyIt->second;
462 std::vector<std::string> sectionOrder_;
463 std::unordered_map<std::string, std::string> sectionDisplayNames_;
464 std::unordered_map<std::string, std::vector<std::string>> keyOrders_;
465 std::unordered_map<std::string, std::unordered_map<std::string, std::string>> keyDisplayNames_;
466 std::unordered_map<std::string, std::unordered_map<std::string, std::vector<std::string>>> keyDropdownOptions_;