1//============================================================================
2//
3// SSSS tt lll lll
4// SS SS tt ll ll
5// SS tttttt eeee ll ll aaaa
6// SSSS tt ee ee ll ll aa
7// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8// SS SS tt ee ll ll aa aa
9// SSSS ttt eeeee llll llll aaaaa
10//
11// Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
12// and the Stella Team
13//
14// See the file "License.txt" for information on usage and redistribution of
15// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16//============================================================================
17
18#ifndef UI_DIALOG_HXX
19#define UI_DIALOG_HXX
20
21class BrowserDialog;
22
23class UIDialog : public Dialog, public CommandSender
24{
25 public:
26 UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font,
27 GuiObject* boss, int max_w, int max_h);
28 virtual ~UIDialog();
29
30 private:
31 void loadConfig() override;
32 void saveConfig() override;
33 void setDefaults() override;
34
35 void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
36 void handleRomViewer();
37 void createBrowser(const string& title);
38
39 private:
40 enum
41 {
42 kListDelay = 'UILd',
43 kMouseWheel = 'UIMw',
44 kControllerDelay = 'UIcd',
45 kChooseRomDirCmd = 'LOrm', // rom select
46 kLauncherSize = 'UIls',
47 kRomViewer = 'UIRv',
48 kChooseSnapLoadDirCmd = 'UIsl', // snapshot dir (load files)
49 kSnapLoadDirChosenCmd = 'UIsc' // snap chosen (load files)
50 };
51
52 const GUI::Font& myFont;
53 TabWidget* myTab;
54
55 // Launcher options
56 EditTextWidget* myRomPath;
57 SliderWidget* myLauncherWidthSlider;
58 SliderWidget* myLauncherHeightSlider;
59 PopUpWidget* myLauncherFontPopup;
60 PopUpWidget* myRomViewerPopup;
61 ButtonWidget* myOpenBrowserButton;
62 EditTextWidget* mySnapLoadPath;
63 CheckboxWidget* myLauncherExitWidget;
64
65 // Misc options
66 PopUpWidget* myPalettePopup;
67 CheckboxWidget* myHidpiWidget;
68 PopUpWidget* myPositionPopup;
69 SliderWidget* myListDelaySlider;
70 SliderWidget* myWheelLinesSlider;
71 SliderWidget* myControllerRateSlider;
72 SliderWidget* myControllerDelaySlider;
73 SliderWidget* myDoubleClickSlider;
74
75 unique_ptr<BrowserDialog> myBrowser;
76
77 // Indicates if this dialog is used for global (vs. in-game) settings
78 bool myIsGlobal;
79
80 private:
81 // Following constructors and assignment operators not supported
82 UIDialog() = delete;
83 UIDialog(const UIDialog&) = delete;
84 UIDialog(UIDialog&&) = delete;
85 UIDialog& operator=(const UIDialog&) = delete;
86 UIDialog& operator=(UIDialog&&) = delete;
87};
88
89#endif
90