| 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 GAME_INFO_DIALOG_HXX |
| 19 | #define GAME_INFO_DIALOG_HXX |
| 20 | |
| 21 | class OSystem; |
| 22 | class GuiObject; |
| 23 | class EditTextWidget; |
| 24 | class ; |
| 25 | class StaticTextWidget; |
| 26 | class RadioButtonGroup; |
| 27 | class TabWidget; |
| 28 | class SliderWidget; |
| 29 | |
| 30 | #include "Dialog.hxx" |
| 31 | #include "Command.hxx" |
| 32 | #include "Props.hxx" |
| 33 | |
| 34 | class GameInfoDialog : public Dialog, public CommandSender |
| 35 | { |
| 36 | public: |
| 37 | GameInfoDialog(OSystem& osystem, DialogContainer& parent, |
| 38 | const GUI::Font& font, GuiObject* boss, int max_w, int max_h); |
| 39 | virtual ~GameInfoDialog() = default; |
| 40 | |
| 41 | private: |
| 42 | void loadConfig() override; |
| 43 | void saveConfig() override; |
| 44 | void handleCommand(CommandSender* sender, int cmd, int data, int id) override; |
| 45 | |
| 46 | void setDefaults() override; |
| 47 | |
| 48 | // load the properties for the 'Emulation' tab |
| 49 | void loadEmulationProperties(const Properties& props); |
| 50 | // load the properties for the 'Console' tab |
| 51 | void loadConsoleProperties(const Properties& props); |
| 52 | // load the properties for the 'Controller' tab |
| 53 | void loadControllerProperties(const Properties& props); |
| 54 | // load the properties for the 'Cartridge' tab |
| 55 | void loadCartridgeProperties(const Properties& props); |
| 56 | |
| 57 | void updateControllerStates(); |
| 58 | void eraseEEPROM(); |
| 59 | |
| 60 | private: |
| 61 | TabWidget* myTab; |
| 62 | |
| 63 | // Emulation properties |
| 64 | PopUpWidget* myBSType; |
| 65 | StaticTextWidget* myTypeDetected; |
| 66 | StaticTextWidget* myStartBankLabel; |
| 67 | PopUpWidget* myStartBank; |
| 68 | PopUpWidget* myFormat; |
| 69 | StaticTextWidget* myFormatDetected; |
| 70 | CheckboxWidget* myPhosphor; |
| 71 | SliderWidget* myPPBlend; |
| 72 | CheckboxWidget* mySound; |
| 73 | |
| 74 | // Console properties |
| 75 | RadioButtonGroup* myLeftDiffGroup; |
| 76 | RadioButtonGroup* myRightDiffGroup; |
| 77 | RadioButtonGroup* myTVTypeGroup; |
| 78 | |
| 79 | // Controller properties |
| 80 | StaticTextWidget* myLeftPortLabel; |
| 81 | StaticTextWidget* myRightPortLabel; |
| 82 | PopUpWidget* myLeftPort; |
| 83 | StaticTextWidget* myLeftPortDetected; |
| 84 | PopUpWidget* myRightPort; |
| 85 | StaticTextWidget* myRightPortDetected; |
| 86 | CheckboxWidget* mySwapPorts; |
| 87 | CheckboxWidget* mySwapPaddles; |
| 88 | StaticTextWidget* myEraseEEPROMLabel; |
| 89 | ButtonWidget* myEraseEEPROMButton; |
| 90 | StaticTextWidget* myEraseEEPROMInfo; |
| 91 | CheckboxWidget* myMouseControl; |
| 92 | PopUpWidget* myMouseX; |
| 93 | PopUpWidget* myMouseY; |
| 94 | SliderWidget* myMouseRange; |
| 95 | |
| 96 | // Cartridge properties |
| 97 | EditTextWidget* myName; |
| 98 | EditTextWidget* myMD5; |
| 99 | EditTextWidget* myManufacturer; |
| 100 | EditTextWidget* myModelNo; |
| 101 | EditTextWidget* myRarity; |
| 102 | EditTextWidget* myNote; |
| 103 | |
| 104 | enum { |
| 105 | kPhosphorChanged = 'PPch', |
| 106 | kPPBlendChanged = 'PBch', |
| 107 | kLeftCChanged = 'LCch', |
| 108 | kRightCChanged = 'RCch', |
| 109 | kMCtrlChanged = 'MCch', |
| 110 | kEEButtonPressed = 'EEgb', |
| 111 | }; |
| 112 | |
| 113 | // Game properties for currently loaded ROM |
| 114 | Properties myGameProperties; |
| 115 | |
| 116 | private: |
| 117 | // Following constructors and assignment operators not supported |
| 118 | GameInfoDialog() = delete; |
| 119 | GameInfoDialog(const GameInfoDialog&) = delete; |
| 120 | GameInfoDialog(GameInfoDialog&&) = delete; |
| 121 | GameInfoDialog& operator=(const GameInfoDialog&) = delete; |
| 122 | GameInfoDialog& operator=(GameInfoDialog&&) = delete; |
| 123 | }; |
| 124 | |
| 125 | #endif |
| 126 | |