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 GLOBAL_PROPS_DIALOG_HXX
19#define GLOBAL_PROPS_DIALOG_HXX
20
21class CommandSender;
22class DialogContainer;
23class CheckboxWidget;
24class PopUpWidget;
25class OSystem;
26
27#include "Dialog.hxx"
28#include "bspf.hxx"
29
30class GlobalPropsDialog : public Dialog, public CommandSender
31{
32 public:
33 GlobalPropsDialog(GuiObject* boss, const GUI::Font& font);
34 virtual ~GlobalPropsDialog() = default;
35
36 private:
37 int addHoldWidgets(const GUI::Font& font, int x, int y, WidgetArray& wid);
38
39 void loadConfig() override;
40 void saveConfig() override;
41 void setDefaults() override;
42
43 void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
44
45 private:
46 enum {
47 kJ0Up, kJ0Down, kJ0Left, kJ0Right, kJ0Fire,
48 kJ1Up, kJ1Down, kJ1Left, kJ1Right, kJ1Fire
49 };
50
51 PopUpWidget* myBSType;
52 PopUpWidget* myLeftDiff;
53 PopUpWidget* myRightDiff;
54 PopUpWidget* myTVType;
55 PopUpWidget* myDebug;
56
57 CheckboxWidget* myJoy[10];
58 CheckboxWidget* myHoldSelect;
59 CheckboxWidget* myHoldReset;
60
61 static const char* const ourJoyState[10];
62
63 private:
64 // Following constructors and assignment operators not supported
65 GlobalPropsDialog() = delete;
66 GlobalPropsDialog(const GlobalPropsDialog&) = delete;
67 GlobalPropsDialog(GlobalPropsDialog&&) = delete;
68 GlobalPropsDialog& operator=(const GlobalPropsDialog&) = delete;
69 GlobalPropsDialog& operator=(GlobalPropsDialog&&) = delete;
70};
71
72#endif
73