1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef GUI_EDITGAMEDIALOG_H 24 #define GUI_EDITGAMEDIALOG_H 25 26 #include "engines/game.h" 27 #include "gui/dialog.h" 28 #include "gui/options.h" 29 30 namespace GUI { 31 32 class BrowserDialog; 33 class CommandSender; 34 class DomainEditTextWidget; 35 class ListWidget; 36 class ButtonWidget; 37 class PicButtonWidget; 38 class GraphicsWidget; 39 class StaticTextWidget; 40 class EditTextWidget; 41 class SaveLoadChooser; 42 43 /* 44 * A dialog that allows the user to edit a config game entry. 45 * TODO: add widgets for some/all of the following 46 * - Maybe scaler/graphics mode. But there are two problems: 47 * 1) Different backends can have different scalers with different names, 48 * so we first have to add a way to query those... no Ender, I don't 49 * think a bitmasked property() value is nice for this, because we would 50 * have to add to the bitmask values whenever a backends adds a new scaler). 51 * 2) At the time the launcher is running, the GFX backend is already setup. 52 * So when a game is run via the launcher, the custom scaler setting for it won't be 53 * used. So we'd also have to add an API to change the scaler during runtime 54 * (the SDL backend can already do that based on user input, but there is no API 55 * to achieve it) 56 * If the APIs for 1&2 are in place, we can think about adding this to the Edit&Option dialogs 57 */ 58 59 class EditGameDialog : public OptionsDialog { 60 typedef Common::String String; 61 typedef Common::Array<Common::String> StringArray; 62 public: 63 EditGameDialog(const String &domain); 64 65 void open(); 66 virtual void apply(); 67 virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); 68 69 protected: 70 virtual void setupGraphicsTab(); 71 72 EditTextWidget *_descriptionWidget; 73 DomainEditTextWidget *_domainWidget; 74 75 StaticTextWidget *_gamePathWidget; 76 StaticTextWidget *_extraPathWidget; 77 StaticTextWidget *_savePathWidget; 78 ButtonWidget *_extraPathClearButton; 79 ButtonWidget *_savePathClearButton; 80 81 StaticTextWidget *_langPopUpDesc; 82 PopUpWidget *_langPopUp; 83 StaticTextWidget *_platformPopUpDesc; 84 PopUpWidget *_platformPopUp; 85 86 CheckboxWidget *_globalGraphicsOverride; 87 CheckboxWidget *_globalAudioOverride; 88 CheckboxWidget *_globalMIDIOverride; 89 CheckboxWidget *_globalMT32Override; 90 CheckboxWidget *_globalVolumeOverride; 91 92 ExtraGuiOptions _engineOptions; 93 }; 94 95 } // End of namespace GUI 96 97 #endif 98