diff options
author | Matthew Hoops | 2012-04-02 10:07:45 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-04-02 10:07:45 -0400 |
commit | b6374a3103787415eaad1eb2ea29559bd4c7d372 (patch) | |
tree | 05defd71f9cd141917e2c36b7fab215718763063 /gui | |
parent | 47ae65e49577b1f881c2f5956ad8550f0089a4fe (diff) | |
parent | d50e34c1bd1152170737bea6bd85c08566426eb6 (diff) | |
download | scummvm-rg350-b6374a3103787415eaad1eb2ea29559bd4c7d372.tar.gz scummvm-rg350-b6374a3103787415eaad1eb2ea29559bd4c7d372.tar.bz2 scummvm-rg350-b6374a3103787415eaad1eb2ea29559bd4c7d372.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeEngine.cpp | 1 | ||||
-rw-r--r-- | gui/ThemeEngine.h | 3 | ||||
-rw-r--r-- | gui/launcher.cpp | 62 | ||||
-rw-r--r-- | gui/module.mk | 1 | ||||
-rw-r--r-- | gui/options.cpp | 32 | ||||
-rw-r--r-- | gui/options.h | 11 | ||||
-rw-r--r-- | gui/predictivedialog.cpp | 932 | ||||
-rw-r--r-- | gui/predictivedialog.h | 140 | ||||
-rw-r--r-- | gui/themes/default.inc | 919 | ||||
-rw-r--r-- | gui/themes/scummclassic.zip | bin | 86033 -> 93076 bytes | |||
-rw-r--r-- | gui/themes/scummclassic/THEMERC | 2 | ||||
-rw-r--r-- | gui/themes/scummclassic/classic_layout.stx | 125 | ||||
-rw-r--r-- | gui/themes/scummclassic/classic_layout_lowres.stx | 125 | ||||
-rw-r--r-- | gui/themes/scummmodern.zip | bin | 1441312 -> 1449403 bytes | |||
-rw-r--r-- | gui/themes/scummmodern/THEMERC | 2 | ||||
-rw-r--r-- | gui/themes/scummmodern/delbtn.bmp | bin | 0 -> 822 bytes | |||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_gfx.stx | 11 | ||||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout.stx | 128 | ||||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout_lowres.stx | 124 | ||||
-rw-r--r-- | gui/themes/translations.dat | bin | 309938 -> 310405 bytes | |||
-rw-r--r-- | gui/widgets/editable.h | 9 |
21 files changed, 2230 insertions, 397 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index bcfd41e05b..fdd7750af9 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -47,6 +47,7 @@ const char * const ThemeEngine::kImageLogo = "logo.bmp"; const char * const ThemeEngine::kImageLogoSmall = "logo_small.bmp"; const char * const ThemeEngine::kImageSearch = "search.bmp"; const char * const ThemeEngine::kImageEraser = "eraser.bmp"; +const char * const ThemeEngine::kImageDelbtn = "delbtn.bmp"; struct TextDrawData { const Graphics::Font *_fontPtr; diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index f041f85ab9..0495a85c88 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -35,7 +35,7 @@ #include "graphics/pixelformat.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.8" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.11" class OSystem; @@ -229,6 +229,7 @@ public: static const char *const kImageLogoSmall; ///< ScummVM logo used in the GMM static const char *const kImageSearch; ///< Search tool image used in the launcher static const char *const kImageEraser; ///< Clear input image used in the launcher + static const char *const kImageDelbtn; ///< Delete characters in the predictive dialog /** * Graphics mode enumeration. diff --git a/gui/launcher.cpp b/gui/launcher.cpp index a3e4925848..a86a98f819 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -145,11 +145,28 @@ protected: CheckboxWidget *_globalMIDIOverride; CheckboxWidget *_globalMT32Override; CheckboxWidget *_globalVolumeOverride; + + ExtraGuiOptions _engineOptions; }; EditGameDialog::EditGameDialog(const String &domain, const String &desc) : OptionsDialog(domain, "GameOptions") { - + // Retrieve all game specific options. + const EnginePlugin *plugin = 0; + // To allow for game domains without a gameid. + // TODO: Is it intentional that this is still supported? + String gameId(ConfMan.get("gameid", domain)); + if (gameId.empty()) + gameId = domain; + // Retrieve the plugin, since we need to access the engine's MetaEngine + // implementation. + EngineMan.findGame(gameId, &plugin); + if (plugin) { + _engineOptions = (*plugin)->getExtraGuiOptions(domain); + } else { + warning("Plugin for target \"%s\" not found! Game specific settings might be missing", domain.c_str()); + } + // GAME: Path to game data (r/o), extra data (r/o), and save data (r/w) String gamePath(ConfMan.get("path", _domain)); String extraPath(ConfMan.get("extrapath", _domain)); @@ -208,7 +225,16 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) } // - // 2) The graphics tab + // 2) The engine tab (shown only if there are custom engine options) + // + if (_engineOptions.size() > 0) { + tab->addTab(_("Engine")); + + addEngineControls(tab, "GameOptions_Engine.", _engineOptions); + } + + // + // 3) The graphics tab // _graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX")); @@ -220,7 +246,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) addGraphicControls(tab, "GameOptions_Graphics."); // - // 3) The audio tab + // 4) The audio tab // tab->addTab(_("Audio")); @@ -233,7 +259,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) addSubtitleControls(tab, "GameOptions_Audio."); // - // 4) The volume tab + // 5) The volume tab // if (g_system->getOverlayWidth() > 320) tab->addTab(_("Volume")); @@ -248,7 +274,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) addVolumeControls(tab, "GameOptions_Volume."); // - // 5) The MIDI tab + // 6) The MIDI tab // if (!_guioptions.contains(GUIO_NOMIDI)) { tab->addTab(_("MIDI")); @@ -262,7 +288,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) } // - // 6) The MT-32 tab + // 7) The MT-32 tab // if (!_guioptions.contains(GUIO_NOMIDI)) { tab->addTab(_("MT-32")); @@ -276,7 +302,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) } // - // 7) The Paths tab + // 8) The Paths tab // if (g_system->getOverlayWidth() > 320) tab->addTab(_("Paths")); @@ -311,7 +337,6 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) _savePathClearButton = addClearButton(tab, "GameOptions_Paths.SavePathClearButton", kCmdSavePathClear); - // Activate the first tab tab->setActiveTab(0); _tabWidget = tab; @@ -342,8 +367,7 @@ void EditGameDialog::open() { e = ConfMan.hasKey("gfx_mode", _domain) || ConfMan.hasKey("render_mode", _domain) || ConfMan.hasKey("fullscreen", _domain) || - ConfMan.hasKey("aspect_ratio", _domain) || - ConfMan.hasKey("disable_dithering", _domain); + ConfMan.hasKey("aspect_ratio", _domain); _globalGraphicsOverride->setState(e); e = ConfMan.hasKey("music_driver", _domain) || @@ -386,6 +410,19 @@ void EditGameDialog::open() { _langPopUp->setEnabled(false); } + // Set the state of engine-specific checkboxes + for (uint j = 0; j < _engineOptions.size(); ++j) { + // The default values for engine-specific checkboxes are not set when + // ScummVM starts, as this would require us to load and poll all of the + // engine plugins on startup. Thus, we set the state of each custom + // option checkbox to what is specified by the engine plugin, and + // update it only if a value has been set in the configuration of the + // currently selected game. + bool isChecked = _engineOptions[j].defaultState; + if (ConfMan.hasKey(_engineOptions[j].configOption, _domain)) + isChecked = ConfMan.getBool(_engineOptions[j].configOption, _domain); + _engineCheckboxes[j]->setState(isChecked); + } const Common::PlatformDescription *p = Common::g_platforms; const Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", _domain)); @@ -429,6 +466,11 @@ void EditGameDialog::close() { ConfMan.removeKey("platform", _domain); else ConfMan.set("platform", Common::getPlatformCode(platform), _domain); + + // Set the state of engine-specific checkboxes + for (uint i = 0; i < _engineOptions.size(); i++) { + ConfMan.setBool(_engineOptions[i].configOption, _engineCheckboxes[i]->getState(), _domain); + } } OptionsDialog::close(); } diff --git a/gui/module.mk b/gui/module.mk index df6b76172a..d272bb0313 100644 --- a/gui/module.mk +++ b/gui/module.mk @@ -13,6 +13,7 @@ MODULE_OBJS := \ message.o \ object.o \ options.o \ + predictivedialog.o \ saveload.o \ themebrowser.o \ ThemeEngine.o \ diff --git a/gui/options.cpp b/gui/options.cpp index 6747195a1b..4fc37c93da 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -102,7 +102,6 @@ void OptionsDialog::init() { _renderModePopUpDesc = 0; _fullscreenCheckbox = 0; _aspectCheckbox = 0; - _disableDitheringCheckbox = 0; _enableAudioSettings = false; _midiPopUp = 0; _midiPopUpDesc = 0; @@ -217,14 +216,6 @@ void OptionsDialog::open() { } #endif // SMALL_SCREEN_DEVICE - // EGA undithering setting - if (_guioptions.contains(GUIO_EGAUNDITHER) || _domain == Common::ConfigManager::kApplicationDomain) { - _disableDitheringCheckbox->setEnabled(true); - _disableDitheringCheckbox->setState(ConfMan.getBool("disable_dithering", _domain)); - } else { - _disableDitheringCheckbox->setState(false); - _disableDitheringCheckbox->setEnabled(false); - } } // Audio options @@ -333,7 +324,6 @@ void OptionsDialog::close() { ConfMan.setBool("fullscreen", _fullscreenCheckbox->getState(), _domain); ConfMan.setBool("aspect_ratio", _aspectCheckbox->getState(), _domain); - ConfMan.setBool("disable_dithering", _disableDitheringCheckbox->getState(), _domain); bool isSet = false; @@ -359,7 +349,6 @@ void OptionsDialog::close() { } else { ConfMan.removeKey("fullscreen", _domain); ConfMan.removeKey("aspect_ratio", _domain); - ConfMan.removeKey("disable_dithering", _domain); ConfMan.removeKey("gfx_mode", _domain); ConfMan.removeKey("render_mode", _domain); } @@ -617,10 +606,6 @@ void OptionsDialog::setGraphicSettingsState(bool enabled) { else _aspectCheckbox->setEnabled(enabled); #endif - if (_guioptions.contains(GUIO_EGAUNDITHER) && enabled) - _disableDitheringCheckbox->setEnabled(true); - else - _disableDitheringCheckbox->setEnabled(false); } void OptionsDialog::setAudioSettingsState(bool enabled) { @@ -769,7 +754,6 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr // Aspect ratio checkbox _aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", _("Aspect ratio correction"), _("Correct aspect ratio for 320x200 games")); - _disableDitheringCheckbox = new CheckboxWidget(boss, prefix + "grDisableDitheringCheckbox", _("EGA undithering"), _("Enable undithering in EGA games that support it")); _enableGraphicSettings = true; } @@ -997,6 +981,22 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre _enableVolumeSettings = true; } +void OptionsDialog::addEngineControls(GuiObject *boss, const Common::String &prefix, const ExtraGuiOptions &engineOptions) { + // Note: up to 7 engine options can currently fit on screen (the most that + // can fit in a 320x200 screen with the classic theme). + // TODO: Increase this number by including the checkboxes inside a scroll + // widget. The appropriate number of checkboxes will need to be added to + // the theme files. + + uint i = 1; + ExtraGuiOptions::const_iterator iter; + for (iter = engineOptions.begin(); iter != engineOptions.end(); ++iter, ++i) { + Common::String id = Common::String::format("%d", i); + _engineCheckboxes.push_back(new CheckboxWidget(boss, + prefix + "customOption" + id + "Checkbox", _(iter->label), _(iter->tooltip))); + } +} + bool OptionsDialog::loadMusicDeviceSetting(PopUpWidget *popup, Common::String setting, MusicType preferredType) { if (!popup || !popup->isEnabled()) return true; diff --git a/gui/options.h b/gui/options.h index 05b3cac617..def56cfa35 100644 --- a/gui/options.h +++ b/gui/options.h @@ -22,6 +22,8 @@ #ifndef OPTIONS_DIALOG_H #define OPTIONS_DIALOG_H +#include "engines/metaengine.h" + #include "gui/dialog.h" #include "common/str.h" #include "audio/mididrv.h" @@ -44,6 +46,8 @@ class RadiobuttonGroup; class RadiobuttonWidget; class OptionsDialog : public Dialog { + typedef Common::Array<CheckboxWidget *> CheckboxWidgetList; + public: OptionsDialog(const Common::String &domain, int x, int y, int w, int h); OptionsDialog(const Common::String &domain, const Common::String &name); @@ -74,6 +78,7 @@ protected: // The default value is the launcher's non-scaled talkspeed value. When SCUMM uses the widget, // it uses its own scale void addSubtitleControls(GuiObject *boss, const Common::String &prefix, int maxSliderVal = 255); + void addEngineControls(GuiObject *boss, const Common::String &prefix, const ExtraGuiOptions &engineOptions); void setGraphicSettingsState(bool enabled); void setAudioSettingsState(bool enabled); @@ -99,7 +104,6 @@ private: PopUpWidget *_gfxPopUp; CheckboxWidget *_fullscreenCheckbox; CheckboxWidget *_aspectCheckbox; - CheckboxWidget *_disableDitheringCheckbox; StaticTextWidget *_renderModePopUpDesc; PopUpWidget *_renderModePopUp; @@ -181,6 +185,11 @@ protected: //Theme Options // Common::String _oldTheme; + + // + // Engine-specific controls + // + CheckboxWidgetList _engineCheckboxes; }; diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp new file mode 100644 index 0000000000..9cd18b81ba --- /dev/null +++ b/gui/predictivedialog.cpp @@ -0,0 +1,932 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gui/predictivedialog.h" +#include "gui/widget.h" +#include "gui/widgets/edittext.h" +#include "gui/gui-manager.h" + +#include "common/config-manager.h" +#include "common/translation.h" +#include "common/events.h" +#include "common/debug.h" +#include "common/system.h" +#include "common/keyboard.h" +#include "common/file.h" +#include "common/savefile.h" + +#ifdef __DS__ +#include "backends/platform/ds/arm9/source/wordcompletion.h" +#endif + +namespace GUI { + +enum { + kCancelCmd = 'CNCL', + kOkCmd = '__OK', + kBut1Cmd = 'BUT1', + kBut2Cmd = 'BUT2', + kBut3Cmd = 'BUT3', + kBut4Cmd = 'BUT4', + kBut5Cmd = 'BUT5', + kBut6Cmd = 'BUT6', + kBut7Cmd = 'BUT7', + kBut8Cmd = 'BUT8', + kBut9Cmd = 'BUT9', + kBut0Cmd = 'BUT0', + kNextCmd = 'NEXT', + kAddCmd = '_ADD', + kModeCmd = 'MODE', + kDelCmd = '_DEL', + kTestCmd = 'TEST' +}; + +enum { + kModePre = 0, + kModeNum = 1, + kModeAbc = 2 +}; + +PredictiveDialog::PredictiveDialog() : Dialog("Predictive") { + new StaticTextWidget(this, "Predictive.Headline", "Enter Text"); + + new ButtonWidget(this, "Predictive.Cancel" , _("Cancel"), 0, kCancelCmd); + new ButtonWidget(this, "Predictive.OK" , _("Ok") , 0, kOkCmd); + new ButtonWidget(this, "Predictive.Button1", "1 `-.&" , 0, kBut1Cmd); + new ButtonWidget(this, "Predictive.Button2", "2 abc" , 0, kBut2Cmd); + new ButtonWidget(this, "Predictive.Button3", "3 def" , 0, kBut3Cmd); + new ButtonWidget(this, "Predictive.Button4", "4 ghi" , 0, kBut4Cmd); + new ButtonWidget(this, "Predictive.Button5", "5 jkl" , 0, kBut5Cmd); + new ButtonWidget(this, "Predictive.Button6", "6 mno" , 0, kBut6Cmd); + new ButtonWidget(this, "Predictive.Button7", "7 pqrs" , 0, kBut7Cmd); + new ButtonWidget(this, "Predictive.Button8", "8 tuv" , 0, kBut8Cmd); + new ButtonWidget(this, "Predictive.Button9", "9 wxyz" , 0, kBut9Cmd); + new ButtonWidget(this, "Predictive.Button0", "0" , 0, kBut0Cmd); + // I18N: You must leave "#" as is, only word 'next' is translatable + new ButtonWidget(this, "Predictive.Next" , _("# next"), 0, kNextCmd); + _addBtn = new ButtonWidget(this, "Predictive.Add", _("add"), 0, kAddCmd); + _addBtn->setEnabled(false); + +#ifndef DISABLE_FANCY_THEMES + _delbtn = new PicButtonWidget(this, "Predictive.Delete", _("Delete char"), kDelCmd); + ((PicButtonWidget *)_delbtn)->useThemeTransparency(true); + ((PicButtonWidget *)_delbtn)->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelbtn)); +#endif + _delbtn = new ButtonWidget(this, "Predictive.Delete" , _("<"), 0, kDelCmd); + // I18N: Pre means 'Predictive', leave '*' as is + _modebutton = new ButtonWidget(this, "Predictive.Pre", _("* Pre"), 0, kModeCmd); + _edittext = new EditTextWidget(this, "Predictive.Word", _search, 0, 0, 0); + + _userDictHasChanged = false; + + _predictiveDict.nameDict = "predictive_dictionary"; + _predictiveDict.fnameDict = "pred.dic"; + _predictiveDict.dictActLine = NULL; + + _userDict.nameDict = "user_dictionary"; + _userDict.fnameDict = "user.dic"; + _userDict.dictActLine = NULL; + + _unitedDict.nameDict = ""; + _unitedDict.fnameDict = ""; + + _predictiveDict.dictLine = NULL; + _predictiveDict.dictText = NULL; + _predictiveDict.dictLineCount = 0; + + if (!_predictiveDict.dictText) { + loadAllDictionary(_predictiveDict); + if (!_predictiveDict.dictText) + debug("Predictive Dialog: pred.dic not loaded"); + } + + _userDict.dictLine = NULL; + _userDict.dictText = NULL; + _userDict.dictTextSize = 0; + _userDict.dictLineCount = 0; + + if (!_userDict.dictText) { + loadAllDictionary(_userDict); + if (!_userDict.dictText) + debug("Predictive Dialog: user.dic not loaded"); + } + + mergeDicts(); + + _unitedDict.dictActLine = NULL; + _unitedDict.dictText = NULL; + + memset(_repeatcount, 0, sizeof(_repeatcount)); + + _prefix.clear(); + _currentCode.clear(); + _currentWord.clear(); + _wordNumber = 0; + _numMatchingWords = 0; + + _lastbutton = kNoAct; + _mode = kModePre; + + _lastTime = 0; + _curTime = 0; + _lastPressBtn = kNoAct; + + _memoryList[0] = _predictiveDict.dictText; + _memoryList[1] = _userDict.dictText; + _numMemory = 0; + + _navigationwithkeys = false; +} + +PredictiveDialog::~PredictiveDialog() { + for (int i = 0; i < _numMemory; i++) { + free(_memoryList[i]); + } + free(_userDict.dictLine); + free(_predictiveDict.dictLine); + free(_unitedDict.dictLine); +} + +void PredictiveDialog::saveUserDictToFile() { + if (_userDictHasChanged) { + ConfMan.registerDefault("user_dictionary", "user.dic"); + + Common::OutSaveFile *file = g_system->getSavefileManager()->openForSaving(ConfMan.get("user_dictionary")); + + for (int i = 0; i < _userDict.dictLineCount; i++) { + file->writeString(_userDict.dictLine[i]); + file->writeString("\n"); + } + + file->finalize(); + delete file; + } +} + +void PredictiveDialog::handleKeyDown(Common::KeyState state) { + ButtonId act = kNoAct; + + if (getFocusWidget() == _edittext) { + setFocusWidget(_addBtn); + } + + switch (state.keycode) { + case Common::KEYCODE_ESCAPE: + saveUserDictToFile(); + close(); + return; + case Common::KEYCODE_LEFT: + _navigationwithkeys = true; + if (_lastbutton == kBtn1Act || _lastbutton == kBtn4Act || _lastbutton == kBtn7Act) + act = ButtonId(_lastbutton + 2); + else if (_lastbutton == kNextAct) + act = kBtn0Act; + else if (_lastbutton == kDelAct) + act = kDelAct; + else if (_lastbutton == kCancelAct) + act = kOkAct; + else if (_lastbutton == kModeAct) + act = kAddAct; + else + act = ButtonId(_lastbutton - 1); + _lastbutton = act; + //needRefresh = true; + break; + case Common::KEYCODE_RIGHT: + _navigationwithkeys = true; + if (_lastbutton == kBtn3Act || _lastbutton == kBtn6Act || _lastbutton == kBtn9Act) + act = ButtonId(_lastbutton - 2); + else if (_lastbutton == kAddAct) + act = kModeAct; + else if (_lastbutton == kDelAct) + act = kDelAct; + else if (_lastbutton == kOkAct) + act = kCancelAct; + else if (_lastbutton == kBtn0Act) + act = kNextAct; + else + act = ButtonId(_lastbutton + 1); + _lastbutton = act; + //needRefresh = true; + break; + case Common::KEYCODE_UP: + _navigationwithkeys = true; + if (_lastbutton <= kBtn3Act) + act = kDelAct; + else if (_lastbutton == kNextAct || _lastbutton == kAddAct) + act = ButtonId(_lastbutton - 2); + else if (_lastbutton == kDelAct) + act = kOkAct; + else if (_lastbutton == kModeAct) + act = kBtn9Act; + else if (_lastbutton == kBtn0Act) + act = kBtn7Act; + else + act = ButtonId(_lastbutton - 3); + _lastbutton = act; + //needRefresh = true; + break; + case Common::KEYCODE_DOWN: + _navigationwithkeys = true; + if (_lastbutton == kBtn7Act) + act = kBtn0Act; + else if (_lastbutton == kBtn8Act || _lastbutton == kBtn9Act) + act = ButtonId(_lastbutton + 2); + else if (_lastbutton == kDelAct) + act = kBtn1Act; + else if (_lastbutton == kCancelAct || _lastbutton == kOkAct) + act = kDelAct; + else if (_lastbutton == kModeAct || _lastbutton == kBtn0Act) + act = ButtonId(_lastbutton - 2); + else + act = ButtonId(_lastbutton + 3); + _lastbutton = act; + //needRefresh = true; + break; + case Common::KEYCODE_KP_ENTER: + if (_navigationwithkeys) { + // when the user has utilized arrow key navigation, + // interpret enter as 'click' on the act button + act = _lastbutton; + } else { + // else it is a shortcut for 'Ok' + act = kOkAct; + } + break; + case Common::KEYCODE_KP_PLUS: + act = kAddAct; + break; + case Common::KEYCODE_BACKSPACE: + case Common::KEYCODE_KP_MINUS: + act = kDelAct; + break; + case Common::KEYCODE_KP_DIVIDE: + act = kNextAct; + break; + case Common::KEYCODE_KP_MULTIPLY: + act = kModeAct; + break; + case Common::KEYCODE_KP0: + act = kBtn0Act; + break; + case Common::KEYCODE_KP1: + case Common::KEYCODE_KP2: + case Common::KEYCODE_KP3: + case Common::KEYCODE_KP4: + case Common::KEYCODE_KP5: + case Common::KEYCODE_KP6: + case Common::KEYCODE_KP7: + case Common::KEYCODE_KP8: + case Common::KEYCODE_KP9: + act = ButtonId(state.keycode - Common::KEYCODE_KP1); + break; + default: + Dialog::handleKeyDown(state); + } + + if (act != kNoAct) { + processBtnActive(act); + } +} + +void PredictiveDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { + ButtonId act = kNoAct; + + _navigationwithkeys = false; + + switch (cmd) { + case kDelCmd: + act = kDelAct; + break; + case kNextCmd: + act = kNextAct; + break; + case kAddCmd: + act = kAddAct; + break; + case kModeCmd: + act = kModeAct; + break; + case kBut1Cmd: + act = kBtn1Act; + break; + case kBut2Cmd: + act = kBtn2Act; + break; + case kBut3Cmd: + act = kBtn3Act; + break; + case kBut4Cmd: + act = kBtn4Act; + break; + case kBut5Cmd: + act = kBtn5Act; + break; + case kBut6Cmd: + act = kBtn6Act; + break; + case kBut7Cmd: + act = kBtn7Act; + break; + case kBut8Cmd: + act = kBtn8Act; + break; + case kBut9Cmd: + act = kBtn9Act; + break; + case kBut0Cmd: + act = kBtn0Act; + break; + case kCancelCmd: + saveUserDictToFile(); + close(); + return; + case kOkCmd: + act = kOkAct; + break; + default: + Dialog::handleCommand(sender, cmd, data); + } + + if (act != kNoAct) { + processBtnActive(act); + } +} + +void PredictiveDialog::processBtnActive(ButtonId button) { + uint8 x; + static const char *const buttonStr[] = { + "1", "2", "3", + "4", "5", "6", + "7", "8", "9", + "0" + }; + + static const char *const buttons[] = { + "'-.&", "abc", "def", + "ghi", "jkl", "mno", + "pqrs", "tuv", "wxyz", + "next", "add", + "<", + "Cancel", "OK", + "Pre", "(0) ", NULL + }; + + if (_mode == kModeAbc) { + if (button >= kBtn1Act && button <= kBtn9Act) { + if (!_lastTime) + _lastTime = g_system->getMillis(); + if (_lastPressBtn == button) { + _curTime = g_system->getMillis(); + if ((_curTime - _lastTime) < kRepeatDelay) { + button = kNextAct; + _lastTime = _curTime; + } else { + _lastTime = 0; + } + } else { + _lastPressBtn = button; + _lastTime = g_system->getMillis(); + } + } + } + + if (button >= kBtn1Act) { + _lastbutton = button; + if (button == kBtn0Act && _mode != kModeNum) { // Space + // bring MRU word at the top of the list when changing words + if (_mode == kModePre && _unitedDict.dictActLine && _numMatchingWords > 1 && _wordNumber != 0) + bringWordtoTop(_unitedDict.dictActLine, _wordNumber); + + strncpy(_temp, _currentWord.c_str(), _currentCode.size()); + _temp[_currentCode.size()] = 0; + _prefix += _temp; + _prefix += " "; + _currentCode.clear(); + _currentWord.clear(); + _numMatchingWords = 0; + memset(_repeatcount, 0, sizeof(_repeatcount)); + _lastTime = 0; + _lastPressBtn = kNoAct; + _curTime = 0; + } else if (button < kNextAct || button == kDelAct || button == kBtn0Act) { // number or backspace + if (button == kDelAct) { // backspace + if (_currentCode.size()) { + _repeatcount[_currentCode.size() - 1] = 0; + _currentCode.deleteLastChar(); + if (_currentCode.empty()) + _currentWord.clear(); + } else { + if (_prefix.size()) + _prefix.deleteLastChar(); + } + } else if (_prefix.size() + _currentCode.size() < kMaxWordLen - 1) { // don't overflow the dialog line + if (button == kBtn0Act) { // zero + _currentCode += buttonStr[9]; + } else { + _currentCode += buttonStr[button]; + } + } + + switch (_mode) { + case kModeNum: + _currentWord = _currentCode; + break; + case kModePre: + if (!matchWord() && _currentCode.size()) { + _currentCode.deleteLastChar(); + matchWord(); + } + _numMatchingWords = countWordsInString(_unitedDict.dictActLine); + break; + case kModeAbc: + for (x = 0; x < _currentCode.size(); x++) + if (_currentCode[x] >= '1') + _temp[x] = buttons[_currentCode[x] - '1'][_repeatcount[x]]; + _temp[_currentCode.size()] = 0; + _currentWord = _temp; + } + } else if (button == kNextAct) { // next + if (_mode == kModePre) { + if (_unitedDict.dictActLine && _numMatchingWords > 1) { + _wordNumber = (_wordNumber + 1) % _numMatchingWords; + char tmp[kMaxLineLen]; + strncpy(tmp, _unitedDict.dictActLine, kMaxLineLen); + tmp[kMaxLineLen - 1] = 0; + char *tok = strtok(tmp, " "); + for (uint8 i = 0; i <= _wordNumber; i++) + tok = strtok(NULL, " "); + _currentWord = Common::String(tok, _currentCode.size()); + } + } else if (_mode == kModeAbc) { + x = _currentCode.size(); + if (x) { + if (_currentCode.lastChar() == '1' || _currentCode.lastChar() == '7' || _currentCode.lastChar() == '9') + _repeatcount[x - 1] = (_repeatcount[x - 1] + 1) % 4; + else + _repeatcount[x - 1] = (_repeatcount[x - 1] + 1) % 3; + + if (_currentCode.lastChar() >= '1') + _currentWord.setChar(buttons[_currentCode[x - 1] - '1'][_repeatcount[x - 1]], x - 1); + } + } + } else if (button == kAddAct) { // add + if (_mode == kModeAbc) + addWordToDict(); + else + debug("Predictive Dialog: button Add doesn't work in this mode"); + } else if (button == kOkAct) { // Ok + // bring MRU word at the top of the list when ok'ed out of the dialog + if (_mode == kModePre && _unitedDict.dictActLine && _numMatchingWords > 1 && _wordNumber != 0) + bringWordtoTop(_unitedDict.dictActLine, _wordNumber); + } else if (button == kModeAct) { // Mode + _mode++; + _addBtn->setEnabled(false); + if (_mode > kModeAbc) { + _mode = kModePre; + // I18N: Pre means 'Predictive', leave '*' as is + _modebutton->setLabel("* Pre"); + } else if (_mode == kModeNum) { + // I18N: 'Num' means Numbers + _modebutton->setLabel("* Num"); + } else { + // I18N: 'Abc' means Latin alphabet input + _modebutton->setLabel("* Abc"); + _addBtn->setEnabled(true); + } + + // truncate current input at mode change + strncpy(_temp, _currentWord.c_str(), _currentCode.size()); + _temp[_currentCode.size()] = 0; + _prefix += _temp; + _currentCode.clear(); + _currentWord.clear(); + memset(_repeatcount, 0, sizeof(_repeatcount)); + + _lastTime = 0; + _lastPressBtn = kNoAct; + _curTime = 0; + } + } + + pressEditText(); + + if (button == kOkAct) + close(); +} + +void PredictiveDialog::handleTickle() { + // TODO/FIXME: This code does not seem to make any sense. It is only + // triggered when _lastTime is zero and sets _lastTime to zero again + // under some condition. This should really be a nop. Probably this + // code intends to check "_lastTime" instead of "!_lastTime". + if (!_lastTime) { + if ((_curTime - _lastTime) > kRepeatDelay) { + _lastTime = 0; + } + } +} + +void PredictiveDialog::mergeDicts() { + _unitedDict.dictLineCount = _predictiveDict.dictLineCount + _userDict.dictLineCount; + _unitedDict.dictLine = (char **)calloc(1, sizeof(char *) * _unitedDict.dictLineCount); + + if (!_unitedDict.dictLine) { + debug("Predictive Dialog: cannot allocate memory for united dic"); + return; + } + + int lenUserDictCode, lenPredictiveDictCode, lenCode; + int i, j, k; + i = j = k = 0; + + while ((i < _userDict.dictLineCount) && (j < _predictiveDict.dictLineCount)) { + lenUserDictCode = strchr(_userDict.dictLine[i], ' ') - _userDict.dictLine[i]; + lenPredictiveDictCode = strchr(_predictiveDict.dictLine[j], ' ') - _predictiveDict.dictLine[j]; + lenCode = (lenUserDictCode >= lenPredictiveDictCode) ? lenUserDictCode : lenPredictiveDictCode; + if (strncmp(_userDict.dictLine[i], _predictiveDict.dictLine[j], lenCode) >= 0) { + _unitedDict.dictLine[k++] = _predictiveDict.dictLine[j++]; + } else { + _unitedDict.dictLine[k++] = _userDict.dictLine[i++]; + } + } + + while (i < _userDict.dictLineCount) { + _unitedDict.dictLine[k++] = _userDict.dictLine[i++]; + } + + while (j < _predictiveDict.dictLineCount) { + _unitedDict.dictLine[k++] = _predictiveDict.dictLine[j++]; + } +} + +uint8 PredictiveDialog::countWordsInString(const char *const str) { + // Count the number of (space separated) words in the given string. + const char *ptr; + + if (!str) + return 0; + + ptr = strchr(str, ' '); + if (!ptr) { + debug("Predictive Dialog: Invalid dictionary line"); + return 0; + } + + uint8 num = 1; + ptr++; + while ((ptr = strchr(ptr, ' '))) { + ptr++; + num++; + } + return num; +} + +void PredictiveDialog::bringWordtoTop(char *str, int wordnum) { + // This function reorders the words on the given pred.dic line + // by moving the word at position 'wordnum' to the front (that is, right behind + // right behind the numerical code word at the start of the line). + Common::Array<Common::String> words; + char buf[kMaxLineLen]; + + if (!str) + return; + strncpy(buf, str, kMaxLineLen); + buf[kMaxLineLen - 1] = 0; + char *word = strtok(buf, " "); + if (!word) { + debug("Predictive Dialog: Invalid dictionary line"); + return; + } + + words.push_back(word); + while ((word = strtok(NULL, " ")) != NULL) + words.push_back(word); + words.insert_at(1, words.remove_at(wordnum + 1)); + + Common::String tmp; + for (uint8 i = 0; i < words.size(); i++) + tmp += words[i] + " "; + tmp.deleteLastChar(); + memcpy(str, tmp.c_str(), strlen(str)); +} + +int PredictiveDialog::binarySearch(const char *const *const dictLine, const Common::String &code, const int dictLineCount) { + int hi = dictLineCount - 1; + int lo = 0; + int line = 0; + while (lo <= hi) { + line = (lo + hi) / 2; + int cmpVal = strncmp(dictLine[line], code.c_str(), code.size()); + if (cmpVal > 0) + hi = line - 1; + else if (cmpVal < 0) + lo = line + 1; + else { + break; + } + } + + if (hi < lo) { + return -(lo + 1); + } else { + return line; + } +} + +bool PredictiveDialog::matchWord() { + // If no text has been entered, then there is no match. + if (_currentCode.empty()) + return false; + + // If the currently entered text is too long, it cannot match anything. + if (_currentCode.size() > kMaxWordLen) + return false; + + // The entries in the dictionary consist of a code, a space, and then + // a space-separated list of words matching this code. + // To exactly match a code, we therefore match the code plus the trailing + // space in the dictionary. + Common::String code = _currentCode + " "; + + int line = binarySearch(_unitedDict.dictLine, code, _unitedDict.dictLineCount); + if (line < 0) { + line = -(line + 1); + _unitedDict.dictActLine = NULL; + } else { + _unitedDict.dictActLine = _unitedDict.dictLine[line]; + } + + _currentWord.clear(); + _wordNumber = 0; + if (0 == strncmp(_unitedDict.dictLine[line], _currentCode.c_str(), _currentCode.size())) { + char tmp[kMaxLineLen]; + strncpy(tmp, _unitedDict.dictLine[line], kMaxLineLen); + tmp[kMaxLineLen - 1] = 0; + char *tok = strtok(tmp, " "); + tok = strtok(NULL, " "); + _currentWord = Common::String(tok, _currentCode.size()); + return true; + } else { + return false; + } +} + +bool PredictiveDialog::searchWord(const char *const where, const Common::String &whatCode) { + const char *ptr = where; + ptr += whatCode.size(); + + const char *newPtr; + bool is = false; + while ((newPtr = strchr(ptr, ' '))) { + if (0 == strncmp(ptr, _currentWord.c_str(), newPtr - ptr)) { + is = true; + break; + } + ptr = newPtr + 1; + } + if (!is) { + if (0 == strcmp(ptr, _currentWord.c_str())) { + is = true; + } + } + return is; +} + +void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Common::String &code) { + char *newLine; + Common::String tmpCode = code + ' '; + int line = binarySearch(dict.dictLine, tmpCode, dict.dictLineCount); + if (line >= 0) { + if (searchWord(dict.dictLine[line], tmpCode)) { + // if we found code and word, we should not insert/expands any word + return; + } else { + // if we found the code, but did not find a word, we must + // EXPANDS the currnent line with new word + int oldLineSize = strlen(dict.dictLine[line]); + int newLineSize = oldLineSize + word.size() + 1; + + newLine = (char *)malloc(newLineSize + 1); + + char *ptr = newLine; + strncpy(ptr, dict.dictLine[line], oldLineSize); + ptr += oldLineSize; + Common::String tmp = ' ' + word + '\0'; + strncpy(ptr, tmp.c_str(), tmp.size()); + + dict.dictLine[line] = newLine; + _memoryList[_numMemory++] = newLine; + + if (dict.nameDict == "user_dictionary") + _userDictHasChanged = true; + + return; + } + } else { // if we didn't find the code, we need to INSERT new line with code and word + if (dict.nameDict == "user_dictionary") { + // if we must INSERT new line(code and word) to user_dictionary, we need to + // check if there is a line that we want to INSERT in predictive dictionay + int predictLine = binarySearch(_predictiveDict.dictLine, tmpCode, _predictiveDict.dictLineCount); + if (predictLine >= 0) { + if (searchWord(_predictiveDict.dictLine[predictLine], tmpCode)) { + // if code and word is in predictive dictionary, we need to copy + // this line to user dictionary + int len = (predictLine == _predictiveDict.dictLineCount - 1) ? &_predictiveDict.dictText[_predictiveDict.dictTextSize] - _predictiveDict.dictLine[predictLine] : + _predictiveDict.dictLine[predictLine + 1] - _predictiveDict.dictLine[predictLine]; + newLine = (char *)malloc(len); + strncpy(newLine, _predictiveDict.dictLine[predictLine], len); + } else { + // if there is no word in predictive dictionary, we need to copy to + // user dictionary mathed line + new word. + int len = (predictLine == _predictiveDict.dictLineCount - 1) ? &_predictiveDict.dictText[_predictiveDict.dictTextSize] - _predictiveDict.dictLine[predictLine] : + _predictiveDict.dictLine[predictLine + 1] - _predictiveDict.dictLine[predictLine]; + newLine = (char *)malloc(len + word.size() + 1); + char *ptr = newLine; + strncpy(ptr, _predictiveDict.dictLine[predictLine], len); + ptr[len - 1] = ' '; + ptr += len; + strncpy(ptr, word.c_str(), word.size()); + ptr[len + word.size()] = '\0'; + } + } else { + // if we didnt find line in predictive dialog, we should copy to user dictionary + // code + word + Common::String tmp; + tmp = tmpCode + word + '\0'; + newLine = (char *)malloc(tmp.size()); + strncpy(newLine, tmp.c_str(), tmp.size()); + } + } else { + // if want to insert line to different from user dictionary, we should copy to this + // dictionary code + word + Common::String tmp; + tmp = tmpCode + word + '\0'; + newLine = (char *)malloc(tmp.size()); + strncpy(newLine, tmp.c_str(), tmp.size()); + } + } + + // start from here are INSERTING new line to dictionaty ( dict ) + char **newDictLine = (char **)calloc(1, sizeof(char *) * (dict.dictLineCount + 1)); + if (!newDictLine) { + warning("Predictive Dialog: cannot allocate memory for index buffer"); + return; + } + newDictLine[dict.dictLineCount] = '\0'; + + int k = 0; + bool inserted = false; + for (int i = 0; i < dict.dictLineCount; i++) { + uint lenPredictiveDictCode = strchr(dict.dictLine[i], ' ') - dict.dictLine[i]; + uint lenCode = (lenPredictiveDictCode >= (code.size() - 1)) ? lenPredictiveDictCode : code.size() - 1; + if ((strncmp(dict.dictLine[i], code.c_str(), lenCode) > 0) && !inserted) { + newDictLine[k++] = newLine; + inserted = true; + } + if (k != (dict.dictLineCount + 1)) { + newDictLine[k++] = dict.dictLine[i]; + } + } + if (!inserted) + newDictLine[k] = newLine; + + _memoryList[_numMemory++] = newLine; + + free(dict.dictLine); + dict.dictLineCount += 1; + dict.dictLine = (char **)calloc(1, sizeof(char *) * dict.dictLineCount); + if (!dict.dictLine) { + warning("Predictive Dialog: cannot allocate memory for index buffer"); + free(newDictLine); + return; + } + + for (int i = 0; i < dict.dictLineCount; i++) { + dict.dictLine[i] = newDictLine[i]; + } + + if (dict.nameDict == "user_dictionary") + _userDictHasChanged = true; + + free(newDictLine); +} + +void PredictiveDialog::addWordToDict() { + if (_numMemory < kMaxWord) { + addWord(_unitedDict, _currentWord, _currentCode); + addWord(_userDict, _currentWord, _currentCode); + } else { + warning("Predictive Dialog: You cannot add word to user dictionary..."); + } +} + +void PredictiveDialog::loadDictionary(Common::SeekableReadStream *in, Dict &dict) { + int lines = 0; + + uint32 time1 = g_system->getMillis(); + + dict.dictTextSize = in->size(); + dict.dictText = (char *)malloc(dict.dictTextSize + 1); + + if (!dict.dictText) { + warning("Predictive Dialog: Not enough memory to load the file user.dic"); + return; + } + + in->read(dict.dictText, dict.dictTextSize); + dict.dictText[dict.dictTextSize] = 0; + uint32 time2 = g_system->getMillis(); + debug("Predictive Dialog: Time to read %s: %d bytes, %d ms", ConfMan.get(dict.nameDict).c_str(), dict.dictTextSize, time2 - time1); + delete in; + + char *ptr = dict.dictText; + lines = 1; + while ((ptr = strchr(ptr, '\n'))) { + lines++; + ptr++; + } + + dict.dictLine = (char **)calloc(1, sizeof(char *) * lines); + if (dict.dictLine == NULL) { + warning("Predictive Dialog: Cannot allocate memory for line index buffer"); + return; + } + dict.dictLine[0] = dict.dictText; + ptr = dict.dictText; + int i = 1; + while ((ptr = strchr(ptr, '\n'))) { + *ptr = 0; + ptr++; +#ifdef __DS__ + // Pass the line on to the DS word list + DS::addAutoCompleteLine(dict.dictLine[i - 1]); +#endif + dict.dictLine[i++] = ptr; + } + if (dict.dictLine[lines - 1][0] == 0) + lines--; + + dict.dictLineCount = lines; + debug("Predictive Dialog: Loaded %d lines", dict.dictLineCount); + + // FIXME: We use binary search on _predictiveDict.dictLine, yet we make no at_tempt + // to ever sort this array (except for the DS port). That seems risky, doesn't it? + +#ifdef __DS__ + // Sort the DS word completion list, to allow for a binary chop later (in the ds backend) + DS::sortAutoCompleteWordList(); +#endif + + uint32 time3 = g_system->getMillis(); + debug("Predictive Dialog: Time to parse %s: %d, total: %d", ConfMan.get(dict.nameDict).c_str(), time3 - time2, time3 - time1); +} + +void PredictiveDialog::loadAllDictionary(Dict &dict) { + ConfMan.registerDefault(dict.nameDict, dict.fnameDict); + + if (dict.nameDict == "predictive_dictionary") { + Common::File *inFile = new Common::File(); + if (!inFile->open(ConfMan.get(dict.nameDict))) { + warning("Predictive Dialog: cannot read file: %s", dict.fnameDict.c_str()); + return; + } + loadDictionary(inFile, dict); + } else { + Common::InSaveFile *inFile = g_system->getSavefileManager()->openForLoading(ConfMan.get(dict.nameDict)); + if (!inFile) { + warning("Predictive Dialog: cannot read file: %s", dict.fnameDict.c_str()); + return; + } + loadDictionary(inFile, dict); + } +} + +void PredictiveDialog::pressEditText() { + Common::strlcpy(_predictiveResult, _prefix.c_str(), sizeof(_predictiveResult)); + Common::strlcat(_predictiveResult, _currentWord.c_str(), sizeof(_predictiveResult)); + _edittext->setEditString(_predictiveResult); + //_edittext->setCaretPos(_prefix.size() + _currentWord.size()); + _edittext->draw(); +} + +} // namespace GUI diff --git a/gui/predictivedialog.h b/gui/predictivedialog.h new file mode 100644 index 0000000000..32de36d5f2 --- /dev/null +++ b/gui/predictivedialog.h @@ -0,0 +1,140 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef GLOBAL_DIALOGS_H +#define GLOBAL_DIALOGS_H + +#include "gui/dialog.h" +#include "common/str.h" +#include "common/stream.h" + +namespace GUI { + +class EditTextWidget; +class ButtonWidget; +class PicButtonWidget; + +enum ButtonId { + kBtn1Act = 0, + kBtn2Act = 1, + kBtn3Act = 2, + kBtn4Act = 3, + kBtn5Act = 4, + kBtn6Act = 5, + kBtn7Act = 6, + kBtn8Act = 7, + kBtn9Act = 8, + kNextAct = 9, + kAddAct = 10, + kDelAct = 11, + kCancelAct = 12, + kOkAct = 13, + kModeAct = 14, + kBtn0Act = 15, + kNoAct = -1 +}; + +enum { + kRepeatDelay = 500 +}; + +enum { + kMaxLineLen = 80, + kMaxWordLen = 24, + kMaxWord = 50 +}; + +class PredictiveDialog : public GUI::Dialog { +public: + PredictiveDialog(); + ~PredictiveDialog(); + + virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual void handleKeyDown(Common::KeyState state); + virtual void handleTickle(); + + const char *getResult() const { return _predictiveResult; } +private: + struct Dict { + char **dictLine; + char *dictText; + char *dictActLine; // using only for united dict... + int32 dictLineCount; + int32 dictTextSize; + Common::String nameDict; + Common::String fnameDict; + }; + + uint8 countWordsInString(const char *const str); + void bringWordtoTop(char *str, int wordnum); + void loadDictionary(Common::SeekableReadStream *in, Dict &dict); + void loadAllDictionary(Dict &dict); + void addWordToDict(); + void addWord(Dict &dict, const Common::String &word, const Common::String &code); + bool searchWord(const char *const where, const Common::String &whatCode); + int binarySearch(const char *const *const dictLine, const Common::String &code, const int dictLineCount); + bool matchWord(); + void processBtnActive(ButtonId active); + void pressEditText(); + + void saveUserDictToFile(); + + void mergeDicts(); +private: + Dict _unitedDict; + Dict _predictiveDict; + Dict _userDict; + + int _mode; + ButtonId _lastbutton; + + bool _userDictHasChanged; + + int _wordNumber; + uint8 _numMatchingWords; + char _predictiveResult[40]; + + Common::String _currentCode; + Common::String _currentWord; + Common::String _prefix; + + uint32 _curTime, _lastTime; + ButtonId _lastPressBtn; + + char _temp[kMaxWordLen + 1]; + int _repeatcount[kMaxWordLen]; + + char *_memoryList[kMaxWord]; + int _numMemory; + + Common::String _search; + + bool _navigationwithkeys; +private: + EditTextWidget *_edittext; + ButtonWidget *_modebutton; + ButtonWidget *_delbtn; + ButtonWidget *_addBtn; +}; + +} // namespace GUI + +#endif diff --git a/gui/themes/default.inc b/gui/themes/default.inc index bd28c2e85d..542f776dbd 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -599,46 +599,50 @@ "/> " "</drawdata> " "</render_info> " -"<layout_info resolution='y<400'> " +"<layout_info resolution='y>399'> " "<globals> " -"<def var='Line.Height' value='12' /> " -"<def var='Font.Height' value='10' /> " -"<def var='About.OuterBorder' value='10'/> " -"<def var='Layout.Spacing' value='8'/> " +"<def var='Line.Height' value='16' /> " +"<def var='Font.Height' value='16' /> " +"<def var='About.OuterBorder' value='80'/> " +"<def var='Layout.Spacing' value='8' /> " "<def var='ShowLauncherLogo' value='0'/> " "<def var='ShowGlobalMenuLogo' value='0'/> " "<def var='ShowSearchPic' value='0'/> " -"<def var='SaveLoadChooser.ExtInfo.Visible' value='0'/> " -"<def var='KeyMapper.Spacing' value='5'/> " -"<def var='KeyMapper.LabelWidth' value='80'/> " -"<def var='KeyMapper.ButtonWidth' value='60'/> " -"<def var='Tooltip.MaxWidth' value='70'/> " -"<def var='Tooltip.XDelta' value='8'/> " -"<def var='Tooltip.YDelta' value='8'/> " -"<widget name='Button' " -"size='72,16' " -"/> " -"<widget name='Slider' " -"size='85,12' " -"/> " +"<def var='SaveLoadChooser.ExtInfo.Visible' value='1'/> " +"<def var='KeyMapper.Spacing' value='10'/> " +"<def var='KeyMapper.LabelWidth' value='100'/> " +"<def var='KeyMapper.ButtonWidth' value='80'/> " +"<def var='Tooltip.MaxWidth' value='200'/> " +"<def var='Tooltip.XDelta' value='16'/> " +"<def var='Tooltip.YDelta' value='16'/> " +"<def var='Predictive.Button.Width' value='60' /> " "<widget name='OptionsLabel' " "size='110,Globals.Line.Height' " "textalign='right' " "/> " "<widget name='SmallLabel' " -"size='18,Globals.Line.Height' " +"size='24,Globals.Line.Height' " +"/> " +"<widget name='ShortOptionsLabel' " +"size='60,Globals.Line.Height' " +"/> " +"<widget name='Button' " +"size='108,24' " +"/> " +"<widget name='Slider' " +"size='128,18' " "/> " "<widget name='PopUp' " -"size='-1,15' " +"size='-1,19' " "/> " "<widget name='Checkbox' " -"size='-1,Globals.Line.Height' " +"size='-1,14' " "/> " "<widget name='Radiobutton' " "size='-1,Globals.Line.Height' " "/> " "<widget name='ListWidget' " -"padding='5,0,0,0' " +"padding='5,0,8,0' " "/> " "<widget name='PopUpWidget' " "padding='7,5,0,0' " @@ -650,28 +654,28 @@ "padding='7,5,5,5' " "/> " "<widget name='Scrollbar' " -"size='9,0' " +"size='15,0' " "/> " "<widget name='TabWidget.Tab' " -"size='45,16' " -"padding='0,0,2,0' " +"size='75,27' " +"padding='0,0,8,0' " "/> " "<widget name='TabWidget.Body' " -"padding='0,0,0,-8' " +"padding='0,0,0,0' " "/> " "<widget name='TabWidget.NavButton' " -"size='32,18' " -"padding='0,0,1,0' " +"size='15,18' " +"padding='0,3,4,0' " "/> " "</globals> " "<dialog name='Launcher' overlays='screen'> " -"<layout type='vertical' center='true' padding='6,6,2,2'> " +"<layout type='vertical' center='true' padding='16,16,8,8'> " "<widget name='Version' " "height='Globals.Line.Height' " "/> " -"<layout type='horizontal' spacing='5' padding='0,0,0,0'> " +"<layout type='horizontal' spacing='5' padding='10,0,0,0'> " "<widget name='SearchDesc' " -"width='50' " +"width='60' " "height='Globals.Line.Height' " "textalign='right' " "/> " @@ -686,38 +690,39 @@ "<space /> " "</layout> " "<widget name='GameList'/> " -"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " "<widget name='LoadGameButton' " -"height='12' " +"height='20' " "/> " "<widget name='AddGameButton' " -"height='12' " +"height='20' " "/> " "<widget name='EditGameButton' " -"height='12' " +"height='20' " "/> " "<widget name='RemoveGameButton' " -"height='12' " +"height='20' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " +"<space size='4'/> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " "<widget name='QuitButton' " -"height='12' " +"height='20' " "/> " "<widget name='AboutButton' " -"height='12' " +"height='20' " "/> " "<widget name='OptionsButton' " -"height='12' " +"height='20' " "/> " "<widget name='StartButton' " -"height='12' " +"height='20' " "/> " "</layout> " "</layout> " "</dialog> " -"<dialog name='Browser' overlays='screen' inset='8' shading='dim'> " -"<layout type='vertical' padding='8,8,0,4'> " +"<dialog name='Browser' overlays='Dialog.Launcher.GameList' shading='dim'> " +"<layout type='vertical' padding='8,8,8,8'> " "<widget name='Headline' " "height='Globals.Line.Height' " "/> " @@ -725,7 +730,7 @@ "height='Globals.Line.Height' " "/> " "<widget name='List'/> " -"<layout type='horizontal' padding='0,0,8,0'> " +"<layout type='horizontal' padding='0,0,16,0'> " "<widget name='Up' " "type='Button' " "/> " @@ -739,10 +744,10 @@ "</layout> " "</layout> " "</dialog> " -"<dialog name='GlobalOptions' overlays='screen' inset='16' shading='dim'> " +"<dialog name='GlobalOptions' overlays='Dialog.Launcher.GameList' shading='dim'> " "<layout type='vertical' padding='0,0,0,0'> " "<widget name='TabWidget'/> " -"<layout type='horizontal' padding='8,8,8,8'> " +"<layout type='horizontal' padding='16,16,16,16'> " "<space/> " "<widget name='Cancel' " "type='Button' " @@ -755,7 +760,7 @@ "</dialog> " "<dialog name='GlobalOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='grModePopupDesc' " "type='OptionsLabel' " "/> " @@ -763,7 +768,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='grRenderPopupDesc' " "type='OptionsLabel' " "/> " @@ -777,14 +782,11 @@ "<widget name='grFullscreenCheckbox' " "type='Checkbox' " "/> " -"<widget name='grDisableDitheringCheckbox' " -"type='Checkbox' " -"/> " "</layout> " "</dialog> " "<dialog name='GlobalOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='auMidiPopupDesc' " "type='OptionsLabel' " "/> " @@ -792,7 +794,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='auOPLPopupDesc' " "type='OptionsLabel' " "/> " @@ -800,7 +802,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='auSampleRatePopupDesc' " "type='OptionsLabel' " "/> " @@ -808,7 +810,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='3' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " "<widget name='subToggleDesc' " "type='OptionsLabel' " "/> " @@ -822,7 +824,7 @@ "type='Radiobutton' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " "<widget name='subSubtitleSpeedDesc' " "type='OptionsLabel' " "/> " @@ -836,8 +838,9 @@ "</layout> " "</dialog> " "<dialog name='GlobalOptions_Volume' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='16,16,16,16' spacing='8'> " +"<layout type='vertical' padding='0,0,0,0' spacing='8'> " +"<layout type='horizontal' padding='0,0,0,0'> " "<widget name='vcMusicText' " "type='OptionsLabel' " "/> " @@ -848,7 +851,7 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0'> " "<widget name='vcSfxText' " "type='OptionsLabel' " "/> " @@ -859,7 +862,7 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0'> " "<widget name='vcSpeechText' " "type='OptionsLabel' " "/> " @@ -870,8 +873,8 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " -"<space size='110' /> " +"</layout> " +"<layout type='vertical' padding='24,0,24,0' center='true'> " "<widget name='vcMuteCheckbox' " "type='Checkbox' " "/> " @@ -880,7 +883,7 @@ "</dialog> " "<dialog name='GlobalOptions_MIDI' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='auPrefGmPopupDesc' " "type='OptionsLabel' " "/> " @@ -888,7 +891,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='mcFontButton' " "type='Button' " "/> " @@ -903,7 +906,7 @@ "<widget name='mcMixedCheckbox' " "type='Checkbox' " "/> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0'> " "<widget name='mcMidiGainText' " "type='OptionsLabel' " "/> " @@ -919,7 +922,7 @@ "</dialog> " "<dialog name='GlobalOptions_MT32' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='auPrefMt32PopupDesc' " "type='OptionsLabel' " "/> " @@ -937,7 +940,7 @@ "</dialog> " "<dialog name='GlobalOptions_Paths' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='16'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='SaveButton' " "type='Button' " "/> " @@ -949,7 +952,7 @@ "width='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='16'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='ThemeButton' " "type='Button' " "/> " @@ -961,7 +964,7 @@ "width='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='16'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='ExtraButton' " "type='Button' " "/> " @@ -985,7 +988,7 @@ "</dialog> " "<dialog name='GlobalOptions_Misc' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='16'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='ThemeButton' " "type='Button' " "/> " @@ -993,31 +996,25 @@ "height='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='RendererPopupDesc' " -"width='80' " -"height='Globals.Line.Height' " -"textalign='right' " +"type='OptionsLabel' " "/> " "<widget name='RendererPopup' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='AutosavePeriodPopupDesc' " -"width='80' " -"height='Globals.Line.Height' " -"textalign='right' " +"type='OptionsLabel' " "/> " "<widget name='AutosavePeriodPopup' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='GuiLanguagePopupDesc' " -"width='80' " -"height='Globals.Line.Height' " -"textalign='right' " +"type='OptionsLabel' " "/> " "<widget name='GuiLanguagePopup' " "type='PopUp' " @@ -1052,10 +1049,10 @@ "</layout> " "</layout> " "</dialog> " -"<dialog name='GameOptions' overlays='screen' inset='16' shading='dim'> " +"<dialog name='GameOptions' overlays='Dialog.Launcher.GameList' shading='dim'> " "<layout type='vertical' padding='0,0,0,0' spacing='16'> " "<widget name='TabWidget'/> " -"<layout type='horizontal' padding='8,8,8,8'> " +"<layout type='horizontal' padding='16,16,16,4'> " "<space/> " "<widget name='Cancel' " "type='Button' " @@ -1067,7 +1064,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='8,8,8,8' spacing='6'> " +"<layout type='vertical' padding='16,16,16,16' spacing='8'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1075,7 +1072,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='8,8,8,8' spacing='6'> " +"<layout type='vertical' padding='16,16,16,16' spacing='8'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1083,7 +1080,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_MIDI' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='8,8,8,8' spacing='6'> " +"<layout type='vertical' padding='16,16,16,16' spacing='8'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1091,7 +1088,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_MT32' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='8,8,8,8' spacing='6'> " +"<layout type='vertical' padding='16,16,16,16' spacing='8'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1099,7 +1096,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Volume' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='8,8,8,8' spacing='6'> " +"<layout type='vertical' padding='16,16,16,16' spacing='8'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1107,43 +1104,34 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Game' overlays='Dialog.GameOptions.TabWidget' shading='dim'> " -"<layout type='vertical' padding='8,8,8,8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='vertical' padding='16,16,16,16'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='Id' " -"width='35' " -"height='Globals.Line.Height' " -"textalign='right' " +"type='OptionsLabel' " "/> " "<widget name='Domain' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='Name' " -"width='35' " -"height='Globals.Line.Height' " -"textalign='right' " +"type='OptionsLabel' " "/> " "<widget name='Desc' " "type='PopUp' " "/> " "</layout> " -"<space size='8'/> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='LangPopupDesc' " -"width='60' " -"height='Globals.Line.Height' " -"textalign='right' " +"type='OptionsLabel' " "/> " "<widget name='LangPopup' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='PlatformPopupDesc' " -"width='60' " -"height='Globals.Line.Height' " -"textalign='right' " +"type='OptionsLabel' " "/> " "<widget name='PlatformPopup' " "type='PopUp' " @@ -1152,8 +1140,8 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Paths' overlays='Dialog.GameOptions.TabWidget' shading='dim'> " -"<layout type='vertical' padding='8,8,8,8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> " +"<layout type='vertical' padding='16,16,16,16'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='Savepath' " "type='Button' " "/> " @@ -1165,7 +1153,7 @@ "width='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='Extrapath' " "type='Button' " "/> " @@ -1177,7 +1165,7 @@ "width='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='Gamepath' " "type='Button' " "/> " @@ -1187,56 +1175,83 @@ "</layout> " "</layout> " "</dialog> " +"<dialog name='GameOptions_Engine' overlays='Dialog.GameOptions.TabWidget' shading='dim'> " +"<layout type='vertical' padding='16,16,16,16'> " +"<widget name='customOption1Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption2Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption3Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption4Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption5Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption6Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption7Checkbox' " +"type='Checkbox' " +"/> " +"</layout> " +"</dialog> " "<dialog name='GlobalMenu' overlays='screen_center'> " -"<layout type='vertical' padding='2,2,4,6' center='true' spacing='6'> " +"<layout type='vertical' padding='16,16,16,16' center='true'> " "<widget name='Title' " -"width='160' " -"height='4' " +"width='210' " +"height='Globals.Line.Height' " "/> " "<widget name='Version' " -"width='160' " -"height='4' " +"width='210' " +"height='Globals.Line.Height' " "/> " -"<space size='1'/> " +"<widget name='Resume' " +"width='150' " +"height='Globals.Button.Height' " +"/> " +"<space size='10'/> " "<widget name='Load' " -"width='120' " -"height='12' " +"width='150' " +"height='Globals.Button.Height' " "/> " "<widget name='Save' " -"width='120' " -"height='12' " +"width='150' " +"height='Globals.Button.Height' " "/> " -"<space size='1'/> " +"<space size='10'/> " "<widget name='Options' " -"width='120' " -"height='12' " +"width='150' " +"height='Globals.Button.Height' " "/> " "<widget name='Help' " -"width='120' " -"height='12' " +"width='150' " +"height='Globals.Button.Height' " "/> " "<widget name='About' " -"width='120' " -"height='12' " -"/> " -"<space size='1'/> " -"<widget name='Resume' " -"width='120' " -"height='12' " +"width='150' " +"height='Globals.Button.Height' " "/> " +"<space size='10'/> " "<widget name='RTL' " -"width='120' " -"height='12' " +"width='150' " +"height='Globals.Button.Height' " "/> " "<widget name='Quit' " -"width='120' " -"height='12' " +"width='150' " +"height='Globals.Button.Height' " "/> " "</layout> " "</dialog> " "<dialog name='GlobalConfig' overlays='screen_center'> " "<layout type='vertical' padding='8,8,8,8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0'> " +"<layout type='vertical' padding='0,0,0,0' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " "<widget name='vcMusicText' " "type='OptionsLabel' " "/> " @@ -1247,7 +1262,7 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " "<widget name='vcSfxText' " "type='OptionsLabel' " "/> " @@ -1258,7 +1273,7 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " "<widget name='vcSpeechText' " "type='OptionsLabel' " "/> " @@ -1269,34 +1284,33 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " -"<space size='110' /> " +"</layout> " +"<layout type='vertical' padding='24,24,24,24' center='true'> " "<widget name='vcMuteCheckbox' " "type='Checkbox' " -"width='80' " +"width='80' " "/> " "</layout> " -"<layout type='vertical' padding='0,0,0,0' spacing='1' center='true'> " +"</layout> " +"<space size='8' /> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " "<widget name='subToggleDesc' " "type='OptionsLabel' " "/> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='subToggleSpeechOnly' " "type='Radiobutton' " -"width='90' " +"width='100' " "/> " "<widget name='subToggleSubOnly' " "type='Radiobutton' " -"width='90' " +"width='100' " "/> " "<widget name='subToggleSubBoth' " "type='Radiobutton' " -"width='90' " +"width='100' " "/> " "</layout> " -"</layout> " -"<space size='2' /> " -"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " "<widget name='subSubtitleSpeedDesc' " "type='OptionsLabel' " "/> " @@ -1307,8 +1321,8 @@ "type='SmallLabel' " "/> " "</layout> " -"<space size='16'/> " -"<layout type='horizontal' padding='0,0,0,0' spacing='4'> " +"<space size='60'/> " +"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " "<widget name='Keys' " "type='Button' " "/> " @@ -1323,15 +1337,23 @@ "</layout> " "</dialog> " "<dialog name='SaveLoadChooser' overlays='screen' inset='8' shading='dim'> " -"<layout type='vertical' padding='8,8,8,8' center='true'> " -"<widget name='Title' height='Globals.Line.Height'/> " +"<layout type='vertical' padding='8,8,8,32' center='true'> " +"<widget name='Title' " +"height='Globals.Line.Height' " +"/> " +"<layout type='horizontal' padding='0,0,0,16' spacing='16'> " "<widget name='List' /> " -"<layout type='horizontal' padding='0,0,16,0'> " +"<widget name='Thumbnail' " +"width='180' " +"height='200' " +"/> " +"</layout> " +"<layout type='horizontal' padding='0,0,0,0'> " "<space/> " "<widget name='Delete' " "type='Button' " "/> " -"<space size='16'/> " +"<space size='32'/> " "<widget name='Cancel' " "type='Button' " "/> " @@ -1341,16 +1363,16 @@ "</layout> " "</layout> " "</dialog> " -"<dialog name='ScummHelp' overlays='screen'> " -"<layout type='vertical' padding='8,8,8,8'> " +"<dialog name='ScummHelp' overlays='screen_center'> " +"<layout type='vertical' padding='8,8,8,8' center='true'> " "<widget name='Title' " -"width='180' " +"width='320' " "height='Globals.Line.Height' " "/> " "<widget name='HelpText' " -"height='140' " +"height='200' " "/> " -"<layout type='horizontal' padding='0,0,0,0'> " +"<layout type='horizontal' padding='0,0,16,0'> " "<widget name='Prev' " "type='Button' " "/> " @@ -1367,7 +1389,7 @@ "<dialog name='LoomTownsDifficultyDialog' overlays='screen_center'> " "<layout type='vertical' padding='8,8,8,8' center='true'> " "<widget name='Description1' " -"width='280' " +"width='320' " "height='Globals.Line.Height' " "/> " "<widget name='Description2' " @@ -1385,20 +1407,20 @@ "</layout> " "</dialog> " "<dialog name='MassAdd' overlays='screen_center' shading='dim'> " -"<layout type='vertical' padding='4,4,16,4' center='true'> " +"<layout type='vertical' padding='8,8,32,8' center='true'> " "<widget name='DirProgressText' " -"width='280' " +"width='480' " "height='Globals.Line.Height' " "/> " "<widget name='GameProgressText' " -"width='280' " +"width='480' " "height='Globals.Line.Height' " "/> " "<widget name='GameList' " -"width='280' " -"height='100' " +"width='480' " +"height='250' " "/> " -"<layout type='horizontal' padding='4,4,4,4'> " +"<layout type='horizontal' padding='8,8,8,8'> " "<widget name='Ok' " "type='Button' " "/> " @@ -1409,70 +1431,161 @@ "</layout> " "</dialog> " "<dialog name='KeyMapper' overlays='screen_center' shading='dim'> " -"<layout type='vertical' padding='8,8,8,8' spacing='10' center='true'> " +"<layout type='vertical' padding='8,8,32,8' spacing='10' center='true'> " "<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='PopupDesc' " "type='OptionsLabel' " "/> " "<widget name='Popup' " "type='PopUp' " -"width='150' " +"width='400' " "height='Globals.Line.Height' " "/> " "</layout> " "<widget name='KeymapArea' " -"width='300' " -"height='120' " +"width='600' " +"height='280' " "/> " "<widget name='Close' " "type='Button' " "/> " "</layout> " "</dialog> " +"<dialog name='Predictive' overlays='screen_center'> " +"<layout type='vertical' padding='5,5,5,5' center='true'> " +"<widget name='Headline' " +"height='Globals.Line.Height' " +"width='210' " +"textalign='center' " +"/> " +"<layout type='horizontal' padding='5,5,5,5'> " +"<widget name='Word' " +"width='190' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Delete' " +"width='20' " +"height='Globals.Button.Height' " +"/> " +"</layout> " +"<space size='5' /> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Button1' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Button2' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Button3' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"</layout> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Button4' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Button5' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Button6' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"</layout> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Button7' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Button8' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Button9' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"</layout> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Pre' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Button0' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Next' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"</layout> " +"<space size='5' /> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Add' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<space size='22'/> " +"<widget name='Cancel' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"<widget name='OK' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Button.Height' " +"/> " +"</layout> " +"</layout> " +"</dialog> " "</layout_info> " -"<layout_info resolution='y>399'> " +"<layout_info resolution='y<400'> " "<globals> " -"<def var='Line.Height' value='16' /> " -"<def var='Font.Height' value='16' /> " -"<def var='About.OuterBorder' value='80'/> " -"<def var='Layout.Spacing' value='8' /> " +"<def var='Line.Height' value='12' /> " +"<def var='Font.Height' value='10' /> " +"<def var='About.OuterBorder' value='10'/> " +"<def var='Layout.Spacing' value='8'/> " "<def var='ShowLauncherLogo' value='0'/> " "<def var='ShowGlobalMenuLogo' value='0'/> " "<def var='ShowSearchPic' value='0'/> " -"<def var='SaveLoadChooser.ExtInfo.Visible' value='1'/> " -"<def var='KeyMapper.Spacing' value='10'/> " -"<def var='KeyMapper.LabelWidth' value='100'/> " -"<def var='KeyMapper.ButtonWidth' value='80'/> " -"<def var='Tooltip.MaxWidth' value='200'/> " -"<def var='Tooltip.XDelta' value='16'/> " -"<def var='Tooltip.YDelta' value='16'/> " +"<def var='SaveLoadChooser.ExtInfo.Visible' value='0'/> " +"<def var='KeyMapper.Spacing' value='5'/> " +"<def var='KeyMapper.LabelWidth' value='80'/> " +"<def var='KeyMapper.ButtonWidth' value='60'/> " +"<def var='Tooltip.MaxWidth' value='70'/> " +"<def var='Tooltip.XDelta' value='8'/> " +"<def var='Tooltip.YDelta' value='8'/> " +"<def var='Predictive.Button.Width' value='45' /> " +"<def var='Predictive.Button.Height' value='15' /> " +"<widget name='Button' " +"size='72,16' " +"/> " +"<widget name='Slider' " +"size='85,12' " +"/> " "<widget name='OptionsLabel' " "size='110,Globals.Line.Height' " "textalign='right' " "/> " "<widget name='SmallLabel' " -"size='24,Globals.Line.Height' " -"/> " -"<widget name='ShortOptionsLabel' " -"size='60,Globals.Line.Height' " -"/> " -"<widget name='Button' " -"size='108,24' " -"/> " -"<widget name='Slider' " -"size='128,18' " +"size='18,Globals.Line.Height' " "/> " "<widget name='PopUp' " -"size='-1,19' " +"size='-1,15' " "/> " "<widget name='Checkbox' " -"size='-1,14' " +"size='-1,Globals.Line.Height' " "/> " "<widget name='Radiobutton' " "size='-1,Globals.Line.Height' " "/> " "<widget name='ListWidget' " -"padding='5,0,8,0' " +"padding='5,0,0,0' " "/> " "<widget name='PopUpWidget' " "padding='7,5,0,0' " @@ -1484,28 +1597,28 @@ "padding='7,5,5,5' " "/> " "<widget name='Scrollbar' " -"size='15,0' " +"size='9,0' " "/> " "<widget name='TabWidget.Tab' " -"size='75,27' " -"padding='0,0,8,0' " +"size='45,16' " +"padding='0,0,2,0' " "/> " "<widget name='TabWidget.Body' " -"padding='0,0,0,0' " +"padding='0,0,0,-8' " "/> " "<widget name='TabWidget.NavButton' " -"size='15,18' " -"padding='0,3,4,0' " +"size='32,18' " +"padding='0,0,1,0' " "/> " "</globals> " "<dialog name='Launcher' overlays='screen'> " -"<layout type='vertical' center='true' padding='16,16,8,8'> " +"<layout type='vertical' center='true' padding='6,6,2,2'> " "<widget name='Version' " "height='Globals.Line.Height' " "/> " -"<layout type='horizontal' spacing='5' padding='10,0,0,0'> " +"<layout type='horizontal' spacing='5' padding='0,0,0,0'> " "<widget name='SearchDesc' " -"width='60' " +"width='50' " "height='Globals.Line.Height' " "textalign='right' " "/> " @@ -1520,39 +1633,38 @@ "<space /> " "</layout> " "<widget name='GameList'/> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " "<widget name='LoadGameButton' " -"height='20' " +"height='12' " "/> " "<widget name='AddGameButton' " -"height='20' " +"height='12' " "/> " "<widget name='EditGameButton' " -"height='20' " +"height='12' " "/> " "<widget name='RemoveGameButton' " -"height='20' " +"height='12' " "/> " "</layout> " -"<space size='4'/> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " "<widget name='QuitButton' " -"height='20' " +"height='12' " "/> " "<widget name='AboutButton' " -"height='20' " +"height='12' " "/> " "<widget name='OptionsButton' " -"height='20' " +"height='12' " "/> " "<widget name='StartButton' " -"height='20' " +"height='12' " "/> " "</layout> " "</layout> " "</dialog> " -"<dialog name='Browser' overlays='Dialog.Launcher.GameList' shading='dim'> " -"<layout type='vertical' padding='8,8,8,8'> " +"<dialog name='Browser' overlays='screen' inset='8' shading='dim'> " +"<layout type='vertical' padding='8,8,0,4'> " "<widget name='Headline' " "height='Globals.Line.Height' " "/> " @@ -1560,7 +1672,7 @@ "height='Globals.Line.Height' " "/> " "<widget name='List'/> " -"<layout type='horizontal' padding='0,0,16,0'> " +"<layout type='horizontal' padding='0,0,8,0'> " "<widget name='Up' " "type='Button' " "/> " @@ -1574,10 +1686,10 @@ "</layout> " "</layout> " "</dialog> " -"<dialog name='GlobalOptions' overlays='Dialog.Launcher.GameList' shading='dim'> " +"<dialog name='GlobalOptions' overlays='screen' inset='16' shading='dim'> " "<layout type='vertical' padding='0,0,0,0'> " "<widget name='TabWidget'/> " -"<layout type='horizontal' padding='16,16,16,16'> " +"<layout type='horizontal' padding='8,8,8,8'> " "<space/> " "<widget name='Cancel' " "type='Button' " @@ -1590,7 +1702,7 @@ "</dialog> " "<dialog name='GlobalOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='grModePopupDesc' " "type='OptionsLabel' " "/> " @@ -1598,7 +1710,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='grRenderPopupDesc' " "type='OptionsLabel' " "/> " @@ -1612,14 +1724,11 @@ "<widget name='grFullscreenCheckbox' " "type='Checkbox' " "/> " -"<widget name='grDisableDitheringCheckbox' " -"type='Checkbox' " -"/> " "</layout> " "</dialog> " "<dialog name='GlobalOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='auMidiPopupDesc' " "type='OptionsLabel' " "/> " @@ -1627,7 +1736,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='auOPLPopupDesc' " "type='OptionsLabel' " "/> " @@ -1635,7 +1744,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='auSampleRatePopupDesc' " "type='OptionsLabel' " "/> " @@ -1643,7 +1752,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='3' center='true'> " "<widget name='subToggleDesc' " "type='OptionsLabel' " "/> " @@ -1657,7 +1766,7 @@ "type='Radiobutton' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='subSubtitleSpeedDesc' " "type='OptionsLabel' " "/> " @@ -1671,9 +1780,8 @@ "</layout> " "</dialog> " "<dialog name='GlobalOptions_Volume' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='horizontal' padding='16,16,16,16' spacing='8'> " -"<layout type='vertical' padding='0,0,0,0' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0'> " +"<layout type='vertical' padding='16,16,16,16' spacing='8'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='vcMusicText' " "type='OptionsLabel' " "/> " @@ -1684,7 +1792,7 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='vcSfxText' " "type='OptionsLabel' " "/> " @@ -1695,7 +1803,7 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='vcSpeechText' " "type='OptionsLabel' " "/> " @@ -1706,8 +1814,8 @@ "type='SmallLabel' " "/> " "</layout> " -"</layout> " -"<layout type='vertical' padding='24,0,24,0' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<space size='110' /> " "<widget name='vcMuteCheckbox' " "type='Checkbox' " "/> " @@ -1716,7 +1824,7 @@ "</dialog> " "<dialog name='GlobalOptions_MIDI' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='auPrefGmPopupDesc' " "type='OptionsLabel' " "/> " @@ -1724,7 +1832,7 @@ "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> " "<widget name='mcFontButton' " "type='Button' " "/> " @@ -1739,7 +1847,7 @@ "<widget name='mcMixedCheckbox' " "type='Checkbox' " "/> " -"<layout type='horizontal' padding='0,0,0,0'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='mcMidiGainText' " "type='OptionsLabel' " "/> " @@ -1755,7 +1863,7 @@ "</dialog> " "<dialog name='GlobalOptions_MT32' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='auPrefMt32PopupDesc' " "type='OptionsLabel' " "/> " @@ -1773,7 +1881,7 @@ "</dialog> " "<dialog name='GlobalOptions_Paths' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='16'> " "<widget name='SaveButton' " "type='Button' " "/> " @@ -1785,7 +1893,7 @@ "width='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='16'> " "<widget name='ThemeButton' " "type='Button' " "/> " @@ -1797,7 +1905,7 @@ "width='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='16'> " "<widget name='ExtraButton' " "type='Button' " "/> " @@ -1821,7 +1929,7 @@ "</dialog> " "<dialog name='GlobalOptions_Misc' overlays='Dialog.GlobalOptions.TabWidget'> " "<layout type='vertical' padding='16,16,16,16' spacing='8'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='16'> " "<widget name='ThemeButton' " "type='Button' " "/> " @@ -1829,25 +1937,31 @@ "height='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='RendererPopupDesc' " -"type='OptionsLabel' " +"width='80' " +"height='Globals.Line.Height' " +"textalign='right' " "/> " "<widget name='RendererPopup' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='AutosavePeriodPopupDesc' " -"type='OptionsLabel' " +"width='80' " +"height='Globals.Line.Height' " +"textalign='right' " "/> " "<widget name='AutosavePeriodPopup' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='GuiLanguagePopupDesc' " -"type='OptionsLabel' " +"width='80' " +"height='Globals.Line.Height' " +"textalign='right' " "/> " "<widget name='GuiLanguagePopup' " "type='PopUp' " @@ -1882,10 +1996,10 @@ "</layout> " "</layout> " "</dialog> " -"<dialog name='GameOptions' overlays='Dialog.Launcher.GameList' shading='dim'> " +"<dialog name='GameOptions' overlays='screen' inset='16' shading='dim'> " "<layout type='vertical' padding='0,0,0,0' spacing='16'> " "<widget name='TabWidget'/> " -"<layout type='horizontal' padding='16,16,16,4'> " +"<layout type='horizontal' padding='8,8,8,8'> " "<space/> " "<widget name='Cancel' " "type='Button' " @@ -1897,7 +2011,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Graphics' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='16,16,16,16' spacing='8'> " +"<layout type='vertical' padding='8,8,8,8' spacing='6'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1905,7 +2019,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Audio' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='16,16,16,16' spacing='8'> " +"<layout type='vertical' padding='8,8,8,8' spacing='6'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1913,7 +2027,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_MIDI' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='16,16,16,16' spacing='8'> " +"<layout type='vertical' padding='8,8,8,8' spacing='6'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1921,7 +2035,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_MT32' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='16,16,16,16' spacing='8'> " +"<layout type='vertical' padding='8,8,8,8' spacing='6'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1929,7 +2043,7 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Volume' overlays='Dialog.GlobalOptions.TabWidget'> " -"<layout type='vertical' padding='16,16,16,16' spacing='8'> " +"<layout type='vertical' padding='8,8,8,8' spacing='6'> " "<widget name='EnableTabCheckbox' " "type='Checkbox' " "/> " @@ -1937,34 +2051,43 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Game' overlays='Dialog.GameOptions.TabWidget' shading='dim'> " -"<layout type='vertical' padding='16,16,16,16'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='vertical' padding='8,8,8,8'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='Id' " -"type='OptionsLabel' " +"width='35' " +"height='Globals.Line.Height' " +"textalign='right' " "/> " "<widget name='Domain' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='Name' " -"type='OptionsLabel' " +"width='35' " +"height='Globals.Line.Height' " +"textalign='right' " "/> " "<widget name='Desc' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<space size='8'/> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='LangPopupDesc' " -"type='OptionsLabel' " +"width='60' " +"height='Globals.Line.Height' " +"textalign='right' " "/> " "<widget name='LangPopup' " "type='PopUp' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='PlatformPopupDesc' " -"type='OptionsLabel' " +"width='60' " +"height='Globals.Line.Height' " +"textalign='right' " "/> " "<widget name='PlatformPopup' " "type='PopUp' " @@ -1973,8 +2096,8 @@ "</layout> " "</dialog> " "<dialog name='GameOptions_Paths' overlays='Dialog.GameOptions.TabWidget' shading='dim'> " -"<layout type='vertical' padding='16,16,16,16'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='vertical' padding='8,8,8,8'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> " "<widget name='Savepath' " "type='Button' " "/> " @@ -1986,7 +2109,7 @@ "width='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> " "<widget name='Extrapath' " "type='Button' " "/> " @@ -1998,7 +2121,7 @@ "width='Globals.Line.Height' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='16' center='true'> " "<widget name='Gamepath' " "type='Button' " "/> " @@ -2008,58 +2131,81 @@ "</layout> " "</layout> " "</dialog> " +"<dialog name='GameOptions_Engine' overlays='Dialog.GameOptions.TabWidget' shading='dim'> " +"<layout type='vertical' padding='8,8,8,8'> " +"<widget name='customOption1Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption2Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption3Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption4Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption5Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption6Checkbox' " +"type='Checkbox' " +"/> " +"<widget name='customOption7Checkbox' " +"type='Checkbox' " +"/> " +"</layout> " +"</dialog> " "<dialog name='GlobalMenu' overlays='screen_center'> " -"<layout type='vertical' padding='16,16,16,16' center='true'> " +"<layout type='vertical' padding='2,2,4,6' center='true' spacing='6'> " "<widget name='Title' " -"width='210' " -"height='Globals.Line.Height' " +"width='160' " +"height='4' " "/> " "<widget name='Version' " -"width='210' " -"height='Globals.Line.Height' " -"/> " -"<widget name='Resume' " -"width='150' " -"height='Globals.Button.Height' " +"width='160' " +"height='4' " "/> " -"<space size='10'/> " +"<space size='1'/> " "<widget name='Load' " -"width='150' " -"height='Globals.Button.Height' " +"width='120' " +"height='12' " "/> " "<widget name='Save' " -"width='150' " -"height='Globals.Button.Height' " +"width='120' " +"height='12' " "/> " -"<space size='10'/> " +"<space size='1'/> " "<widget name='Options' " -"width='150' " -"height='Globals.Button.Height' " +"width='120' " +"height='12' " "/> " "<widget name='Help' " -"width='150' " -"height='Globals.Button.Height' " +"width='120' " +"height='12' " "/> " "<widget name='About' " -"width='150' " -"height='Globals.Button.Height' " +"width='120' " +"height='12' " +"/> " +"<space size='1'/> " +"<widget name='Resume' " +"width='120' " +"height='12' " "/> " -"<space size='10'/> " "<widget name='RTL' " -"width='150' " -"height='Globals.Button.Height' " +"width='120' " +"height='12' " "/> " "<widget name='Quit' " -"width='150' " -"height='Globals.Button.Height' " +"width='120' " +"height='12' " "/> " "</layout> " "</dialog> " "<dialog name='GlobalConfig' overlays='screen_center'> " "<layout type='vertical' padding='8,8,8,8'> " -"<layout type='horizontal' padding='0,0,0,0'> " -"<layout type='vertical' padding='0,0,0,0' center='true'> " -"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='vcMusicText' " "type='OptionsLabel' " "/> " @@ -2070,7 +2216,7 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='vcSfxText' " "type='OptionsLabel' " "/> " @@ -2081,7 +2227,7 @@ "type='SmallLabel' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='8'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='vcSpeechText' " "type='OptionsLabel' " "/> " @@ -2092,33 +2238,34 @@ "type='SmallLabel' " "/> " "</layout> " -"</layout> " -"<layout type='vertical' padding='24,24,24,24' center='true'> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " +"<space size='110' /> " "<widget name='vcMuteCheckbox' " "type='Checkbox' " -"width='80' " +"width='80' " "/> " "</layout> " -"</layout> " -"<space size='8' /> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " +"<layout type='vertical' padding='0,0,0,0' spacing='1' center='true'> " "<widget name='subToggleDesc' " "type='OptionsLabel' " "/> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='subToggleSpeechOnly' " "type='Radiobutton' " -"width='100' " +"width='90' " "/> " "<widget name='subToggleSubOnly' " "type='Radiobutton' " -"width='100' " +"width='90' " "/> " "<widget name='subToggleSubBoth' " "type='Radiobutton' " -"width='100' " +"width='90' " "/> " "</layout> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " +"</layout> " +"<space size='2' /> " +"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'> " "<widget name='subSubtitleSpeedDesc' " "type='OptionsLabel' " "/> " @@ -2129,8 +2276,8 @@ "type='SmallLabel' " "/> " "</layout> " -"<space size='60'/> " -"<layout type='horizontal' padding='0,0,0,0' spacing='10'> " +"<space size='16'/> " +"<layout type='horizontal' padding='0,0,0,0' spacing='4'> " "<widget name='Keys' " "type='Button' " "/> " @@ -2145,23 +2292,15 @@ "</layout> " "</dialog> " "<dialog name='SaveLoadChooser' overlays='screen' inset='8' shading='dim'> " -"<layout type='vertical' padding='8,8,8,32' center='true'> " -"<widget name='Title' " -"height='Globals.Line.Height' " -"/> " -"<layout type='horizontal' padding='0,0,0,16' spacing='16'> " +"<layout type='vertical' padding='8,8,8,8' center='true'> " +"<widget name='Title' height='Globals.Line.Height'/> " "<widget name='List' /> " -"<widget name='Thumbnail' " -"width='180' " -"height='200' " -"/> " -"</layout> " -"<layout type='horizontal' padding='0,0,0,0'> " +"<layout type='horizontal' padding='0,0,16,0'> " "<space/> " "<widget name='Delete' " "type='Button' " "/> " -"<space size='32'/> " +"<space size='16'/> " "<widget name='Cancel' " "type='Button' " "/> " @@ -2171,16 +2310,16 @@ "</layout> " "</layout> " "</dialog> " -"<dialog name='ScummHelp' overlays='screen_center'> " -"<layout type='vertical' padding='8,8,8,8' center='true'> " +"<dialog name='ScummHelp' overlays='screen'> " +"<layout type='vertical' padding='8,8,8,8'> " "<widget name='Title' " -"width='320' " +"width='180' " "height='Globals.Line.Height' " "/> " "<widget name='HelpText' " -"height='200' " +"height='140' " "/> " -"<layout type='horizontal' padding='0,0,16,0'> " +"<layout type='horizontal' padding='0,0,0,0'> " "<widget name='Prev' " "type='Button' " "/> " @@ -2197,7 +2336,7 @@ "<dialog name='LoomTownsDifficultyDialog' overlays='screen_center'> " "<layout type='vertical' padding='8,8,8,8' center='true'> " "<widget name='Description1' " -"width='320' " +"width='280' " "height='Globals.Line.Height' " "/> " "<widget name='Description2' " @@ -2215,20 +2354,20 @@ "</layout> " "</dialog> " "<dialog name='MassAdd' overlays='screen_center' shading='dim'> " -"<layout type='vertical' padding='8,8,32,8' center='true'> " +"<layout type='vertical' padding='4,4,16,4' center='true'> " "<widget name='DirProgressText' " -"width='480' " +"width='280' " "height='Globals.Line.Height' " "/> " "<widget name='GameProgressText' " -"width='480' " +"width='280' " "height='Globals.Line.Height' " "/> " "<widget name='GameList' " -"width='480' " -"height='250' " +"width='280' " +"height='100' " "/> " -"<layout type='horizontal' padding='8,8,8,8'> " +"<layout type='horizontal' padding='4,4,4,4'> " "<widget name='Ok' " "type='Button' " "/> " @@ -2239,24 +2378,114 @@ "</layout> " "</dialog> " "<dialog name='KeyMapper' overlays='screen_center' shading='dim'> " -"<layout type='vertical' padding='8,8,32,8' spacing='10' center='true'> " +"<layout type='vertical' padding='8,8,8,8' spacing='10' center='true'> " "<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> " "<widget name='PopupDesc' " "type='OptionsLabel' " "/> " "<widget name='Popup' " "type='PopUp' " -"width='400' " +"width='150' " "height='Globals.Line.Height' " "/> " "</layout> " "<widget name='KeymapArea' " -"width='600' " -"height='280' " +"width='300' " +"height='120' " "/> " "<widget name='Close' " "type='Button' " "/> " "</layout> " "</dialog> " +"<dialog name='Predictive' overlays='screen_center'> " +"<layout type='vertical' padding='1,1,1,1' center='true'> " +"<widget name='Headline' " +"height='Globals.Line.Height' " +"width='150' " +"textalign='center' " +"/> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Word' " +"width='120' " +"height='Globals.Button.Height' " +"/> " +"<widget name='Delete' " +"width='20' " +"height='Globals.Predictive.Button.Height' " +"/> " +"</layout> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Button1' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Button2' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Button3' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"</layout> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Button4' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Button5' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Button6' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"</layout> " +"<layout type='horizontal' padding='3,3,3,3'> " +"<widget name='Button7' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Button8' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Button9' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"</layout> " +"<layout type='horizontal' padding='3,3,3,0'> " +"<widget name='Pre' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Button0' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Next' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"</layout> " +"<space size='3' /> " +"<layout type='horizontal' padding='3,3,0,3'> " +"<widget name='Add' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='Cancel' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"<widget name='OK' " +"width='Globals.Predictive.Button.Width' " +"height='Globals.Predictive.Button.Height' " +"/> " +"</layout> " +"</layout> " +"</dialog> " "</layout_info> " diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip Binary files differindex d4cfd0cba3..eb5ac2d9f7 100644 --- a/gui/themes/scummclassic.zip +++ b/gui/themes/scummclassic.zip diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC index f3904cbb6d..b808aee32f 100644 --- a/gui/themes/scummclassic/THEMERC +++ b/gui/themes/scummclassic/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8.8:ScummVM Classic Theme:No Author] +[SCUMMVM_STX0.8.11:ScummVM Classic Theme:No Author] diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index 9da42635a7..8717892995 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -42,6 +42,8 @@ <def var = 'Tooltip.XDelta' value = '16'/> <!-- basically cursor size --> <def var = 'Tooltip.YDelta' value = '16'/> + <def var = 'Predictive.Button.Width' value = '60' /> + <widget name = 'OptionsLabel' size = '110, Globals.Line.Height' textalign = 'right' @@ -215,9 +217,6 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> - <widget name = 'grDisableDitheringCheckbox' - type = 'Checkbox' - /> </layout> </dialog> @@ -627,6 +626,32 @@ </layout> </dialog> + <dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'> + <layout type = 'vertical' padding = '16, 16, 16, 16'> + <widget name = 'customOption1Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption2Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption3Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption4Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption5Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption6Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption7Checkbox' + type = 'Checkbox' + /> + </layout> + </dialog> + <dialog name = 'GlobalMenu' overlays = 'screen_center'> <layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'> <widget name = 'Title' @@ -885,4 +910,98 @@ /> </layout> </dialog> + + <dialog name = 'Predictive' overlays = 'screen_center'> + <layout type = 'vertical' padding = '5, 5, 5, 5' center = 'true'> + <widget name = 'Headline' + height = 'Globals.Line.Height' + width = '210' + textalign = 'center' + /> + + <layout type = 'horizontal' padding = '5, 5, 5, 5'> + <widget name = 'Word' + width = '190' + height = 'Globals.Button.Height' + /> + <widget name = 'Delete' + width = '20' + height = 'Globals.Button.Height' + /> + </layout> + <space size = '5' /> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button1' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button2' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button3' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button4' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button5' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button6' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button7' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button8' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button9' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Pre' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button0' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Next' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + <space size = '5' /> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Add' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <space size = '22'/> + <widget name = 'Cancel' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'OK' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + </layout> + </dialog> </layout_info> diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index dc528a4c00..8f5db9d364 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -43,6 +43,9 @@ <def var = 'Tooltip.XDelta' value = '8'/> <!-- basically cursor size --> <def var = 'Tooltip.YDelta' value = '8'/> + <def var = 'Predictive.Button.Width' value = '45' /> + <def var = 'Predictive.Button.Height' value = '15' /> + <widget name = 'Button' size = '72, 16' /> @@ -213,9 +216,6 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> - <widget name = 'grDisableDitheringCheckbox' - type = 'Checkbox' - /> </layout> </dialog> @@ -639,6 +639,32 @@ </layout> </dialog> + <dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'> + <layout type = 'vertical' padding = '8, 8, 8, 8'> + <widget name = 'customOption1Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption2Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption3Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption4Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption5Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption6Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption7Checkbox' + type = 'Checkbox' + /> + </layout> + </dialog> + <dialog name = 'GlobalMenu' overlays = 'screen_center'> <layout type = 'vertical' padding = '2, 2, 4, 6' center = 'true' spacing='6'> <widget name = 'Title' @@ -887,4 +913,97 @@ /> </layout> </dialog> + + <dialog name = 'Predictive' overlays = 'screen_center'> + <layout type = 'vertical' padding = '1, 1, 1, 1' center = 'true'> + <widget name = 'Headline' + height = 'Globals.Line.Height' + width = '150' + textalign = 'center' + /> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Word' + width = '120' + height = 'Globals.Button.Height' + /> + <widget name = 'Delete' + width = '20' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <!-- <space size = '3' /> --> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button1' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button2' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button3' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button4' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button5' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button6' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button7' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button8' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button9' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 0'> + <widget name = 'Pre' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button0' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Next' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <space size = '3' /> + <layout type = 'horizontal' padding = '3, 3, 0, 3'> + <widget name = 'Add' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <!-- <space size = '22'/> --> + <widget name = 'Cancel' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'OK' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + </layout> + </dialog> </layout_info> diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip Binary files differindex fc4c89cbcc..94f7cd8f6e 100644 --- a/gui/themes/scummmodern.zip +++ b/gui/themes/scummmodern.zip diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC index 32bd36241e..e6c441d543 100644 --- a/gui/themes/scummmodern/THEMERC +++ b/gui/themes/scummmodern/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8.8:ScummVM Modern Theme:No Author] +[SCUMMVM_STX0.8.11:ScummVM Modern Theme:No Author] diff --git a/gui/themes/scummmodern/delbtn.bmp b/gui/themes/scummmodern/delbtn.bmp Binary files differnew file mode 100644 index 0000000000..7eb2f409f5 --- /dev/null +++ b/gui/themes/scummmodern/delbtn.bmp diff --git a/gui/themes/scummmodern/scummmodern_gfx.stx b/gui/themes/scummmodern/scummmodern_gfx.stx index 5f7cc69acd..403f636fd0 100644 --- a/gui/themes/scummmodern/scummmodern_gfx.stx +++ b/gui/themes/scummmodern/scummmodern_gfx.stx @@ -100,6 +100,7 @@ <bitmap filename = 'logo_small.bmp'/> <bitmap filename = 'search.bmp'/> <bitmap filename = 'eraser.bmp'/> + <bitmap filename = 'delbtn.bmp'/> </bitmaps> <fonts> @@ -335,9 +336,13 @@ <drawdata id = 'scrollbar_button_hover' cache = 'false' resolution = 'y<400'> <drawstep func = 'roundedsq' radius = '10' - fill = 'none' - fg_color = 'darkgray' + fill = 'gradient' + gradient_start = 'brightpink' + gradient_end = 'darkpink' stroke = '1' + fg_color = 'darkred' + bevel = '1' + bevel_color = 'brightred' /> <drawstep func = 'triangle' fg_color = 'shadowcolor' @@ -346,7 +351,7 @@ height = '5' xpos = 'right' ypos = 'center' - padding = '0,0,2,0' + padding = '0,0,1,0' orientation = 'top' /> </drawdata> diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 69ad9c79fa..087a844a1b 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -49,6 +49,8 @@ <def var = 'Tooltip.XDelta' value = '16'/> <!-- basically cursor size --> <def var = 'Tooltip.YDelta' value = '32'/> + <def var = 'Predictive.Button.Width' value = '60' /> + <widget name = 'OptionsLabel' size = '115, Globals.Line.Height' textalign = 'right' @@ -59,8 +61,7 @@ <widget name = 'Button' size = '108, 24' - /> - + /> <widget name = 'Slider' size = '128, 18' @@ -230,9 +231,6 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> - <widget name = 'grDisableDitheringCheckbox' - type = 'Checkbox' - /> </layout> </dialog> @@ -642,6 +640,32 @@ </layout> </dialog> + <dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'> + <layout type = 'vertical' padding = '16, 16, 16, 16'> + <widget name = 'customOption1Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption2Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption3Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption4Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption5Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption6Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption7Checkbox' + type = 'Checkbox' + /> + </layout> + </dialog> + <dialog name = 'GlobalMenu' overlays = 'screen_center'> <layout type = 'vertical' padding = '16, 16, 16, 16' center = 'true'> <widget name = 'Logo' @@ -899,5 +923,99 @@ type = 'Button' /> </layout> + </dialog> + <dialog name = 'Predictive' overlays = 'screen_center'> + <layout type = 'vertical' padding = '5, 5, 5, 5' center = 'true'> + <widget name = 'Headline' + height = 'Globals.Line.Height' + width = '210' + textalign = 'center' + /> + + <layout type = 'horizontal' padding = '5, 5, 5, 5'> + <widget name = 'Word' + width = '190' + height = 'Globals.Button.Height' + /> + <widget name = 'Delete' + width = '20' + height = 'Globals.Button.Height' + /> + </layout> + <space size = '5' /> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button1' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button2' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button3' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button4' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button5' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button6' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Button7' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button8' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button9' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Pre' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Button0' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'Next' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + <space size = '5' /> + <layout type = 'horizontal' padding = '3, 3, 3, 3'> + <widget name = 'Add' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <space size = '22'/> + <widget name = 'Cancel' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + <widget name = 'OK' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Button.Height' + /> + </layout> + </layout> </dialog> + </layout_info> diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx index 0bfd16c1d9..987fee800a 100644 --- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx +++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx @@ -33,6 +33,9 @@ <def var = 'SaveLoadChooser.ExtInfo.Visible' value = '0'/> + <def var = 'Predictive.Button.Width' value = '45' /> + <def var = 'Predictive.Button.Height' value = '15' /> + <widget name = 'Button' size = '72, 16' /> @@ -211,9 +214,6 @@ <widget name = 'grFullscreenCheckbox' type = 'Checkbox' /> - <widget name = 'grDisableDitheringCheckbox' - type = 'Checkbox' - /> </layout> </dialog> @@ -637,6 +637,32 @@ </layout> </dialog> + <dialog name = 'GameOptions_Engine' overlays = 'Dialog.GameOptions.TabWidget' shading = 'dim'> + <layout type = 'vertical' padding = '8, 8, 8, 8'> + <widget name = 'customOption1Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption2Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption3Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption4Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption5Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption6Checkbox' + type = 'Checkbox' + /> + <widget name = 'customOption7Checkbox' + type = 'Checkbox' + /> + </layout> + </dialog> + <dialog name = 'GlobalMenu' overlays = 'screen_center'> <layout type = 'vertical' padding = '4, 4, 4, 4' center = 'true' spacing='2'> <widget name = 'Title' @@ -885,4 +911,96 @@ /> </layout> </dialog> + <dialog name = 'Predictive' overlays = 'screen_center'> + <layout type = 'vertical' center = 'true'> + <widget name = 'Headline' + height = 'Globals.Line.Height' + width = '150' + textalign = 'center' + /> + <layout type = 'horizontal' padding = '0, 0, 2, 2'> + <widget name = 'Word' + width = '120' + height = 'Globals.Button.Height' + /> + <widget name = 'Delete' + width = '20' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <!-- <space size = '3' /> --> + <layout type = 'horizontal' padding = '0, 0, 2, 2'> + <widget name = 'Button1' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button2' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button3' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '0, 0, 2, 2'> + <widget name = 'Button4' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button5' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button6' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '0, 0, 2, 2'> + <widget name = 'Button7' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button8' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button9' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <layout type = 'horizontal' padding = '0, 0, 2, 2'> + <widget name = 'Pre' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Button0' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'Next' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + <space size = '2' /> + <layout type = 'horizontal' padding = '0, 0, 2, 2'> + <widget name = 'Add' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <!-- <space size = '22'/> --> + <widget name = 'Cancel' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + <widget name = 'OK' + width = 'Globals.Predictive.Button.Width' + height = 'Globals.Predictive.Button.Height' + /> + </layout> + </layout> + </dialog> </layout_info> diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex d3a384ef77..c196db0e20 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h index 4b51ac9145..7e453c1204 100644 --- a/gui/widgets/editable.h +++ b/gui/widgets/editable.h @@ -70,18 +70,17 @@ public: virtual void handleTickle(); virtual bool handleKeyDown(Common::KeyState state); - virtual void reflowLayout(); + bool setCaretPos(int newPos); + protected: virtual void startEditMode() = 0; virtual void endEditMode() = 0; - virtual void abortEditMode() = 0; - + virtual void abortEditMode() = 0; virtual Common::Rect getEditRect() const = 0; virtual int getCaretOffset() const; - void drawCaret(bool erase); - bool setCaretPos(int newPos); + void drawCaret(bool erase); bool adjustOffset(); void makeCaretVisible(); |