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 MIN_UI_COMMAND_DIALOG_HXX
19#define MIN_UI_COMMAND_DIALOG_HXX
20
21class Properties;
22class CommandSender;
23class DialogContainer;
24class OSystem;
25class StellaSettingsDialog;
26class OptionsDialog;
27
28#include "Dialog.hxx"
29
30class MinUICommandDialog : public Dialog
31{
32 public:
33 MinUICommandDialog(OSystem& osystem, DialogContainer& parent);
34 virtual ~MinUICommandDialog() = default;
35
36 protected:
37 void loadConfig() override;
38 void handleKeyDown(StellaKey key, StellaMod mod, bool repeated) override;
39 void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
40 void updateSlot(int slot);
41 void updateWinds();
42 void updateTVFormat();
43 void openSettings();
44 void processCancel() override;
45
46 // column 0
47 ButtonWidget* myColorButton;
48 ButtonWidget* myLeftDiffButton;
49 ButtonWidget* myRightDiffButton;
50 // column 1
51 ButtonWidget* mySaveStateButton;
52 ButtonWidget* myStateSlotButton;
53 ButtonWidget* myLoadStateButton;
54 ButtonWidget* myRewindButton;
55 ButtonWidget* myUnwindButton;
56 // column 2
57 ButtonWidget* myTVFormatButton;
58 ButtonWidget* myStretchButton;
59 ButtonWidget* myPhosphorButton;
60
61 unique_ptr<StellaSettingsDialog> myStellaSettingsDialog;
62 unique_ptr<OptionsDialog> myOptionsDialog;
63
64 enum
65 {
66 kSelectCmd = 'Csel',
67 kResetCmd = 'Cres',
68 kColorCmd = 'Ccol',
69 kLeftDiffCmd = 'Cldf',
70 kRightDiffCmd = 'Crdf',
71 kSaveStateCmd = 'Csst',
72 kStateSlotCmd = 'Ccst',
73 kLoadStateCmd = 'Clst',
74 kSnapshotCmd = 'Csnp',
75 kRewindCmd = 'Crew',
76 kUnwindCmd = 'Cunw',
77 kFormatCmd = 'Cfmt',
78 kStretchCmd = 'Cstr',
79 kPhosphorCmd = 'Cpho',
80 kSettings = 'Cscn',
81 kFry = 'Cfry',
82 kExitGameCmd = 'Cext',
83 };
84
85 private:
86 // Following constructors and assignment operators not supported
87 MinUICommandDialog() = delete;
88 MinUICommandDialog(const MinUICommandDialog&) = delete;
89 MinUICommandDialog(MinUICommandDialog&&) = delete;
90 MinUICommandDialog& operator=(const MinUICommandDialog&) = delete;
91 MinUICommandDialog& operator=(MinUICommandDialog&&) = delete;
92};
93
94#endif
95