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 CHEAT_CODE_DIALOG_HXX |
19 | #define CHEAT_CODE_DIALOG_HXX |
20 | |
21 | class DialogContainer; |
22 | class CommandSender; |
23 | class Widget; |
24 | class ButtonWidget; |
25 | class StaticTextWidget; |
26 | class CheckListWidget; |
27 | class EditTextWidget; |
28 | class OptionsDialog; |
29 | class InputTextDialog; |
30 | class OSystem; |
31 | |
32 | #include "Dialog.hxx" |
33 | |
34 | class CheatCodeDialog : public Dialog |
35 | { |
36 | public: |
37 | CheatCodeDialog(OSystem& osystem, DialogContainer& parent, |
38 | const GUI::Font& font); |
39 | virtual ~CheatCodeDialog(); |
40 | |
41 | protected: |
42 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; |
43 | void loadConfig() override; |
44 | void saveConfig() override; |
45 | |
46 | private: |
47 | void addCheat(); |
48 | void editCheat(); |
49 | void removeCheat(); |
50 | void addOneShotCheat(); |
51 | |
52 | private: |
53 | CheckListWidget* myCheatList; |
54 | unique_ptr<InputTextDialog> myCheatInput; |
55 | |
56 | ButtonWidget* myEditButton; |
57 | ButtonWidget* myRemoveButton; |
58 | |
59 | enum { |
60 | kAddCheatCmd = 'CHTa', |
61 | kEditCheatCmd = 'CHTe', |
62 | kAddOneShotCmd = 'CHTo', |
63 | kCheatAdded = 'CHad', |
64 | kCheatEdited = 'CHed', |
65 | kOneShotCheatAdded = 'CHoa', |
66 | kRemCheatCmd = 'CHTr' |
67 | }; |
68 | |
69 | private: |
70 | // Following constructors and assignment operators not supported |
71 | CheatCodeDialog() = delete; |
72 | CheatCodeDialog(const CheatCodeDialog&) = delete; |
73 | CheatCodeDialog(CheatCodeDialog&&) = delete; |
74 | CheatCodeDialog& operator=(const CheatCodeDialog&) = delete; |
75 | CheatCodeDialog& operator=(CheatCodeDialog&&) = delete; |
76 | }; |
77 | |
78 | #endif |
79 | |