diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeEngine.cpp | 10 | ||||
-rw-r--r-- | gui/about.cpp | 2 | ||||
-rw-r--r-- | gui/console.cpp | 23 | ||||
-rw-r--r-- | gui/console.h | 6 | ||||
-rw-r--r-- | gui/credits.h | 37 | ||||
-rw-r--r-- | gui/debugger.cpp | 10 | ||||
-rw-r--r-- | gui/gui-manager.cpp | 13 | ||||
-rw-r--r-- | gui/predictivedialog.cpp | 18 | ||||
-rw-r--r-- | gui/recorderdialog.h | 2 | ||||
-rw-r--r-- | gui/themes/default.inc | 1231 | ||||
-rw-r--r-- | gui/themes/scummclassic.zip | bin | 113348 -> 110107 bytes | |||
-rw-r--r-- | gui/themes/scummclassic/classic_layout_lowres.stx | 77 | ||||
-rw-r--r-- | gui/widgets/editable.cpp | 36 | ||||
-rw-r--r-- | gui/widgets/editable.h | 5 | ||||
-rw-r--r-- | gui/widgets/edittext.cpp | 2 | ||||
-rw-r--r-- | gui/widgets/list.cpp | 5 |
16 files changed, 782 insertions, 695 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 688654d208..9fe482ddcc 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1360,17 +1360,17 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int // If there is no entry yet for this color in the palette: Add one if (!colorToIndex.contains(col)) { + if (colorsFound >= MAX_CURS_COLORS) { + warning("Cursor contains too many colors (%d, but only %d are allowed)", colorsFound, MAX_CURS_COLORS); + return false; + } + const int index = colorsFound++; colorToIndex[col] = index; _cursorPal[index * 3 + 0] = r; _cursorPal[index * 3 + 1] = g; _cursorPal[index * 3 + 2] = b; - - if (colorsFound > MAX_CURS_COLORS) { - warning("Cursor contains too many colors (%d, but only %d are allowed)", colorsFound, MAX_CURS_COLORS); - return false; - } } // Copy pixel from the 16 bit source surface to the 8bit target surface diff --git a/gui/about.cpp b/gui/about.cpp index 3bb1934e28..459a6b5490 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -56,7 +56,7 @@ enum { static const char *copyright_text[] = { "", -"C0""Copyright (C) 2001-2013 The ScummVM project", +"C0""Copyright (C) 2001-2014 The ScummVM Team", "C0""http://www.scummvm.org", "", "C0""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 binary.", diff --git a/gui/console.cpp b/gui/console.cpp index 49e2fccd98..7e88b6dfb5 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -82,8 +82,6 @@ ConsoleDialog::ConsoleDialog(float widthPercent, float heightPercent) _historyIndex = 0; _historyLine = 0; _historySize = 0; - for (int i = 0; i < kHistorySize; i++) - _history[i][0] = '\0'; // Display greetings & prompt print(gScummVMFullVersion); @@ -274,24 +272,19 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { if (len > 0) { - // We have to allocate the string buffer with new, since VC++ sadly does not - // comply to the C++ standard, so we can't use a dynamic sized stack array. - char *str = new char[len + 1]; + Common::String str; // Copy the user input to str for (i = 0; i < len; i++) - str[i] = buffer(_promptStartPos + i); - str[len] = '\0'; + str.insertChar(buffer(_promptStartPos + i), i); // Add the input to the history addToHistory(str); // Pass it to the input callback, if any if (_callbackProc) - keepRunning = (*_callbackProc)(this, str, _callbackRefCon); + keepRunning = (*_callbackProc)(this, str.c_str(), _callbackRefCon); - // Get rid of the string buffer - delete[] str; } print(PROMPT); @@ -575,8 +568,8 @@ void ConsoleDialog::killLastWord() { } } -void ConsoleDialog::addToHistory(const char *str) { - strcpy(_history[_historyIndex], str); +void ConsoleDialog::addToHistory(const Common::String &str) { + _history[_historyIndex] = str; _historyIndex = (_historyIndex + 1) % kHistorySize; _historyLine = 0; if (_historySize < kHistorySize) @@ -590,8 +583,7 @@ void ConsoleDialog::historyScroll(int direction) { if (_historyLine == 0 && direction > 0) { int i; for (i = 0; i < _promptEndPos - _promptStartPos; i++) - _history[_historyIndex][i] = buffer(_promptStartPos + i); - _history[_historyIndex][i] = '\0'; + _history[_historyIndex].insertChar(buffer(_promptStartPos + i), i); } // Advance to the next line in the history @@ -617,7 +609,8 @@ void ConsoleDialog::historyScroll(int direction) { idx = (_historyIndex - _historyLine + _historySize) % _historySize; else idx = _historyIndex; - for (int i = 0; i < kLineBufferSize && _history[idx][i] != '\0'; i++) + int length = _history[idx].size(); + for (int i = 0; i < length; i++) printCharIntern(_history[idx][i]); _promptEndPos = _currentPos; diff --git a/gui/console.h b/gui/console.h index 50a00a1ad1..194bfd6fc0 100644 --- a/gui/console.h +++ b/gui/console.h @@ -23,6 +23,7 @@ #define CONSOLE_DIALOG_H #include "gui/dialog.h" +#include "common/str.h" namespace GUI { @@ -69,7 +70,6 @@ protected: enum { kBufferSize = 32768, kCharsPerLine = 128, - kLineBufferSize = 256, kHistorySize = 20 }; @@ -112,7 +112,7 @@ protected: CompletionCallbackProc _completionCallbackProc; void *_completionCallbackRefCon; - char _history[kHistorySize][kLineBufferSize]; + Common::String _history[kHistorySize]; int _historySize; int _historyIndex; int _historyLine; @@ -184,7 +184,7 @@ protected: void killLastWord(); // History - void addToHistory(const char *str); + void addToHistory(const Common::String &str); void historyScroll(int direction); }; diff --git a/gui/credits.h b/gui/credits.h index 3a4d7769f6..bcace12d13 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -77,6 +77,12 @@ static const char *credits[] = { "C0""Ludvig Strigeus", "C2""(retired)", "", +"C1""Avalanche", +"A0""Peter Bozso", +"C0""Peter Bozs\363", +"A0""Arnaud Boutonne", +"C0""Arnaud Boutonn\351", +"", "C1""CGE", "A0""Arnaud Boutonne", "C0""Arnaud Boutonn\351", @@ -297,6 +303,9 @@ static const char *credits[] = { "A0""Einar Johan T. Somaaen", "C0""Einar Johan T. S\370m\345en", "", +"C1""ZVision", +"C0""Adrian Astley", +"", "", "C1""Backend Teams", "C1""Android", @@ -513,7 +522,7 @@ static const char *credits[] = { "C0""Johannes Schickel", "", "", -"C1""Translations", +"C1""GUI Translations", "C0""Thierry Crozat", "C2""Translation Lead", "C1""Basque", @@ -583,6 +592,28 @@ static const char *credits[] = { "C0""Lubomyr Lisen", "", "", +"C1""Game Translations", +"C1""CGE", +"C0""Dan Serban", +"C2""Soltys English translation", +"A0""Victor Gonzalez", +"C0""V\355ctor Gonz\341lez", +"C2""Soltys Spanish translation", +"A0""Alejandro Gomez de la Munoza", +"C0""Alejandro G\363mez de la Mu\361oza", +"C2""Soltys Spanish translation", +"", +"C1""Drascula", +"C0""Thierry Crozat", +"C2""Improve French translation", +"", +"C1""Mortevielle", +"C0""Hugo Labrande", +"C2""Improve English translation", +"C0""Thierry Crozat", +"C2""Improve English translation", +"", +"", "C1""Websites (design)", "A0""Dobo Balazs", "C0""Dob\363 Bal\341zs", @@ -618,6 +649,8 @@ static const char *credits[] = { "C2""Several fixes for Simon1", "C0""Jeroen Janssen", "C2""Numerous readability and bugfix patches", +"C0""Keith Kaisershot", +"C2""Several Pegasus Prime patches", "C0""Andreas Karlsson", "C2""Initial port for SymbianOS", "C0""Claudio Matsuoka", @@ -769,6 +802,8 @@ static const char *credits[] = { "C2""For additional work on the original MT-32 emulator", "C0""James Woodcock", "C2""Soundtrack enhancements", +"C0""Anton Yartsev", +"C2""For the original re-implementation of the ZVision engine", "C0""Tony Warriner and everyone at Revolution Software Ltd. for sharing with us the source of some of their brilliant games, allowing us to release Beneath a Steel Sky as freeware... and generally being supportive above and beyond the call of duty.", "C0""", "C0""John Passfield and Steve Stamatiadis for sharing the source of their classic title, Flight of the Amazon Queen and also being incredibly supportive.", diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 35627dd584..9aa322e12e 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -133,6 +133,14 @@ Debugger *g_readline_debugger; char *readline_completionFunction(const char *text, int state) { return g_readline_debugger->readlineComplete(text, state); } + +#ifdef USE_READLINE_INT_COMPLETION +typedef int RLCompFunc_t(const char *, int); +#else +typedef char *RLCompFunc_t(const char *, int); +#endif + + } // end of anonymous namespace #endif @@ -162,7 +170,7 @@ void Debugger::enter() { // TODO: add support for saving/loading history? g_readline_debugger = this; - rl_completion_entry_function = &readline_completionFunction; + rl_completion_entry_function = (RLCompFunc_t *)&readline_completionFunction; char *line_read = 0; do { diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 1505c8c707..999d61e854 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -309,6 +309,19 @@ void GuiManager::runLoop() { Common::Event event; while (eventMan->pollEvent(event)) { + // We will need to check whether the screen changed while polling + // for an event here. While we do send EVENT_SCREEN_CHANGED + // whenever this happens we still cannot be sure that we get such + // an event immediately. For example, we might have an mouse move + // event queued before an screen changed event. In some rare cases + // this would make the GUI redraw (with the code a few lines + // below) when it is not yet updated for new overlay dimensions. + // As a result ScummVM would crash because it tries to copy data + // outside the actual overlay screen. + if (event.type != Common::EVENT_SCREEN_CHANGED) { + checkScreenChange(); + } + // The top dialog can change during the event loop. In that case, flush all the // dialog-related events since they were probably generated while the old dialog // was still visible, and therefore not intended for the new one. diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp index 5ce093e054..5d45a3060e 100644 --- a/gui/predictivedialog.cpp +++ b/gui/predictivedialog.cpp @@ -69,7 +69,7 @@ enum { PredictiveDialog::PredictiveDialog() : Dialog("Predictive") { new StaticTextWidget(this, "Predictive.Headline", "Enter Text"); - _btns = (ButtonWidget **)calloc(1, sizeof(ButtonWidget *) * 16); + _btns = (ButtonWidget **)calloc(16, sizeof(ButtonWidget *)); _btns[kCancelAct] = new ButtonWidget(this, "Predictive.Cancel", _("Cancel") , 0, kCancelCmd); _btns[kOkAct] = new ButtonWidget(this, "Predictive.OK", _("Ok") , 0, kOkCmd); @@ -144,6 +144,7 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") { _currentWord.clear(); _wordNumber = 0; _numMatchingWords = 0; + memset(_predictiveResult, 0, sizeof(_predictiveResult)); _lastbutton = kNoAct; _mode = kModePre; @@ -420,6 +421,9 @@ void PredictiveDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 d case kCancelCmd: saveUserDictToFile(); close(); + // When we cancel the dialog no result should be returned. Thus, we + // will invalidate any result here. + _predictiveResult[0] = 0; return; case kOkCmd: _currBtn = kOkAct; @@ -614,7 +618,7 @@ void PredictiveDialog::handleTickle() { void PredictiveDialog::mergeDicts() { _unitedDict.dictLineCount = _predictiveDict.dictLineCount + _userDict.dictLineCount; - _unitedDict.dictLine = (char **)calloc(1, sizeof(char *) * _unitedDict.dictLineCount); + _unitedDict.dictLine = (char **)calloc(_unitedDict.dictLineCount, sizeof(char *)); if (!_unitedDict.dictLine) { debug("Predictive Dialog: cannot allocate memory for united dic"); @@ -748,7 +752,8 @@ bool PredictiveDialog::matchWord() { char tmp[kMaxLineLen]; strncpy(tmp, _unitedDict.dictLine[line], kMaxLineLen); tmp[kMaxLineLen - 1] = 0; - char *tok = strtok(tmp, " "); + char *tok; + strtok(tmp, " "); tok = strtok(NULL, " "); _currentWord = Common::String(tok, _currentCode.size()); return true; @@ -853,7 +858,7 @@ void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Com } // start from here are INSERTING new line to dictionaty ( dict ) - char **newDictLine = (char **)calloc(1, sizeof(char *) * (dict.dictLineCount + 1)); + char **newDictLine = (char **)calloc(dict.dictLineCount + 1, sizeof(char *)); if (!newDictLine) { warning("Predictive Dialog: cannot allocate memory for index buffer"); @@ -861,7 +866,6 @@ void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Com return; } - newDictLine[dict.dictLineCount] = '\0'; int k = 0; bool inserted = false; @@ -883,7 +887,7 @@ void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Com free(dict.dictLine); dict.dictLineCount += 1; - dict.dictLine = (char **)calloc(1, sizeof(char *) * dict.dictLineCount); + dict.dictLine = (char **)calloc(dict.dictLineCount, sizeof(char *)); if (!dict.dictLine) { warning("Predictive Dialog: cannot allocate memory for index buffer"); free(newDictLine); @@ -935,7 +939,7 @@ void PredictiveDialog::loadDictionary(Common::SeekableReadStream *in, Dict &dict ptr++; } - dict.dictLine = (char **)calloc(1, sizeof(char *) * lines); + dict.dictLine = (char **)calloc(lines, sizeof(char *)); if (dict.dictLine == NULL) { warning("Predictive Dialog: Cannot allocate memory for line index buffer"); return; diff --git a/gui/recorderdialog.h b/gui/recorderdialog.h index eb690a4f38..9c5965f56d 100644 --- a/gui/recorderdialog.h +++ b/gui/recorderdialog.h @@ -34,6 +34,8 @@ class ContainerWidget; class StaticTextWidget; class RecorderDialog : public GUI::Dialog { + using GUI::Dialog::runModal; + private: bool _firstScreenshotUpdate; Common::PlaybackFile _playbackFile; diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 352cc86852..fe1bf041ad 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -1,615 +1,4 @@ "<?xml version = '1.0'?>" -"<render_info>" -"<palette>" -"<color name='black' " -"rgb='0,0,0' " -"/>" -"<color name='lightgrey' " -"rgb='104,104,104' " -"/>" -"<color name='darkgrey' " -"rgb='64,64,64' " -"/>" -"<color name='green' " -"rgb='32,160,32' " -"/>" -"<color name='green2' " -"rgb='0,255,0' " -"/>" -"</palette>" -"<fonts>" -"<font id='text_default' " -"file='helvb12.bdf' " -"/>" -"<font resolution='y<400' " -"id='text_default' " -"file='clR6x12.bdf' " -"/>" -"<font id='text_button' " -"file='helvb12.bdf' " -"/>" -"<font resolution='y<400' " -"id='text_button' " -"file='clR6x12.bdf' " -"/>" -"<font id='text_normal' " -"file='helvb12.bdf' " -"/>" -"<font resolution='y<400' " -"id='text_normal' " -"file='clR6x12.bdf' " -"/>" -"<font id='tooltip_normal' " -"file='fixed5x8.bdf' " -"/>" -"<text_color id='color_normal' " -"color='green' " -"/>" -"<text_color id='color_normal_inverted' " -"color='black' " -"/>" -"<text_color id='color_normal_hover' " -"color='green2' " -"/>" -"<text_color id='color_normal_disabled' " -"color='lightgrey' " -"/>" -"<text_color id='color_alternative' " -"color='lightgrey' " -"/>" -"<text_color id='color_alternative_inverted' " -"color='255,255,255' " -"/>" -"<text_color id='color_alternative_hover' " -"color='176,176,176' " -"/>" -"<text_color id='color_alternative_disabled' " -"color='darkgrey' " -"/>" -"<text_color id='color_button' " -"color='green' " -"/>" -"<text_color id='color_button_hover' " -"color='green2' " -"/>" -"<text_color id='color_button_disabled' " -"color='lightgrey' " -"/>" -"</fonts>" -"<defaults fill='foreground' fg_color='darkgrey' bg_color='black' shadow='0' bevel_color='lightgrey'/>" -"<drawdata id='text_selection' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='lightgrey' " -"/>" -"</drawdata>" -"<drawdata id='text_selection_focus' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='green' " -"/>" -"</drawdata>" -"<drawdata id='mainmenu_bg' cache='false'>" -"<drawstep func='fill' " -"fill='foreground' " -"fg_color='black' " -"/>" -"</drawdata>" -"<drawdata id='special_bg' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"/>" -"</drawdata>" -"<drawdata id='tooltip_bg' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='foreground' " -"fg_color='black' " -"/>" -"</drawdata>" -"<drawdata id='separator' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"height='2' " -"ypos='center' " -"fg_color='lightgrey' " -"/>" -"</drawdata>" -"<drawdata id='scrollbar_base' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"/>" -"</drawdata>" -"<drawdata id='scrollbar_handle_hover' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='green2' " -"/>" -"</drawdata>" -"<drawdata id='scrollbar_handle_idle' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='green' " -"/>" -"</drawdata>" -"<drawdata id='scrollbar_button_idle' cache='false' resolution='y>399'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='10' " -"height='10' " -"xpos='right' " -"ypos='center' " -"padding='0,0,3,0' " -"orientation='top' " -"/>" -"</drawdata>" -"<drawdata id='scrollbar_button_idle' cache='false' resolution='y<400'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='5' " -"height='5' " -"xpos='right' " -"ypos='center' " -"padding='0,0,2,0' " -"orientation='top' " -"/>" -"</drawdata>" -"<drawdata id='scrollbar_button_hover' cache='false' resolution='y>399'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='10' " -"height='10' " -"xpos='right' " -"ypos='center' " -"padding='0,0,3,0' " -"orientation='top' " -"/>" -"</drawdata>" -"<drawdata id='scrollbar_button_hover' cache='false' resolution='y<400'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='5' " -"height='5' " -"xpos='right' " -"ypos='center' " -"padding='0,0,2,0' " -"orientation='top' " -"/>" -"</drawdata>" -"<drawdata id='tab_active' cache='false'>" -"<text font='text_default' " -"text_color='color_normal_hover' " -"vertical_align='center' " -"horizontal_align='center' " -"/>" -"<drawstep func='tab' " -"bevel='2' " -"radius='0' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='tab_inactive' cache='false'>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='center' " -"horizontal_align='center' " -"/>" -"<drawstep func='tab' " -"bevel='2' " -"radius='0' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='tab_background' cache='false'>" -"</drawdata>" -"<drawdata id='widget_slider' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='slider_disabled' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='lightgrey' " -"/>" -"</drawdata>" -"<drawdata id='slider_full' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='green' " -"/>" -"</drawdata>" -"<drawdata id='slider_hover' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='green2' " -"/>" -"</drawdata>" -"<drawdata id='widget_small' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='popup_idle' cache='false' resolution='y>399'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='10' " -"height='5' " -"xpos='right' " -"ypos='10' " -"padding='0,0,7,0' " -"orientation='bottom' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='10' " -"height='5' " -"xpos='right' " -"ypos='4' " -"padding='0,0,7,0' " -"orientation='top' " -"/>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"</drawdata>" -"<drawdata id='popup_idle' cache='false' resolution='y<400'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='7' " -"height='4' " -"xpos='right' " -"ypos='9' " -"padding='0,0,3,0' " -"orientation='bottom' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='7' " -"height='4' " -"xpos='right' " -"ypos='4' " -"padding='0,0,3,0' " -"orientation='top' " -"/>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"</drawdata>" -"<drawdata id='popup_disabled' cache='false' resolution='y>399'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='10' " -"height='5' " -"xpos='right' " -"ypos='10' " -"padding='0,0,7,0' " -"orientation='bottom' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='10' " -"height='5' " -"xpos='right' " -"ypos='4' " -"padding='0,0,7,0' " -"orientation='top' " -"/>" -"<text font='text_default' " -"text_color='color_normal_disabled' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"</drawdata>" -"<drawdata id='popup_disabled' cache='false' resolution='y<400'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='7' " -"height='4' " -"xpos='right' " -"ypos='9' " -"padding='0,0,3,0' " -"orientation='bottom' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='7' " -"height='4' " -"xpos='right' " -"ypos='4' " -"padding='0,0,3,0' " -"orientation='top' " -"/>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"</drawdata>" -"<drawdata id='popup_hover' cache='false' resolution='y>399'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='10' " -"height='5' " -"xpos='right' " -"ypos='10' " -"padding='0,0,7,0' " -"orientation='bottom' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='10' " -"height='5' " -"xpos='right' " -"ypos='4' " -"padding='0,0,7,0' " -"orientation='top' " -"/>" -"<text font='text_default' " -"text_color='color_normal_hover' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"</drawdata>" -"<drawdata id='popup_hover' cache='false' resolution='y<400'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='7' " -"height='4' " -"xpos='right' " -"ypos='9' " -"padding='0,0,3,0' " -"orientation='bottom' " -"/>" -"<drawstep func='triangle' " -"fg_color='green' " -"fill='foreground' " -"width='7' " -"height='4' " -"xpos='right' " -"ypos='4' " -"padding='0,0,3,0' " -"orientation='top' " -"/>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"</drawdata>" -"<drawdata id='widget_textedit' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='plain_bg' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"/>" -"</drawdata>" -"<drawdata id='caret' cache='false'>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='lightgrey' " -"/>" -"</drawdata>" -"<drawdata id='default_bg' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"/>" -"</drawdata>" -"<drawdata id='button_pressed' cache='false'>" -"<text font='text_button' " -"text_color='color_alternative_inverted' " -"vertical_align='center' " -"horizontal_align='center' " -"/>" -"<drawstep func='square' " -"fill='foreground' " -"fg_color='green' " -"/>" -"</drawdata>" -"<drawdata id='button_idle' cache='false'>" -"<text font='text_button' " -"text_color='color_button' " -"vertical_align='center' " -"horizontal_align='center' " -"/>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='button_hover' cache='false'>" -"<text font='text_button' " -"text_color='color_button_hover' " -"vertical_align='center' " -"horizontal_align='center' " -"/>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='button_disabled' cache='false'>" -"<text font='text_button' " -"text_color='color_button_disabled' " -"vertical_align='center' " -"horizontal_align='center' " -"/>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='checkbox_disabled' cache='false'>" -"<text font='text_default' " -"text_color='color_normal_disabled' " -"vertical_align='top' " -"horizontal_align='left' " -"/>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='checkbox_selected' cache='false'>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='top' " -"horizontal_align='left' " -"/>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"<drawstep func='cross' " -"fill='foreground' " -"stroke='2' " -"fg_color='green' " -"/>" -"</drawdata>" -"<drawdata id='checkbox_default' cache='false'>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='top' " -"horizontal_align='left' " -"/>" -"<drawstep func='bevelsq' " -"bevel='2' " -"fill='none' " -"/>" -"</drawdata>" -"<drawdata id='radiobutton_default' cache='false'>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"<drawstep func='circle' " -"width='7' " -"height='7' " -"radius='7' " -"fill='background' " -"bg_color='darkgrey' " -"xpos='0' " -"ypos='0' " -"/>" -"</drawdata>" -"<drawdata id='radiobutton_selected' cache='false'>" -"<text font='text_default' " -"text_color='color_normal' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"<drawstep func='circle' " -"width='7' " -"height='7' " -"radius='7' " -"fg_color='darkgrey' " -"fill='none' " -"xpos='0' " -"ypos='0' " -"/>" -"<drawstep func='circle' " -"width='7' " -"height='7' " -"radius='5' " -"fg_color='green' " -"fill='foreground' " -"xpos='2' " -"ypos='2' " -"/>" -"</drawdata>" -"<drawdata id='radiobutton_disabled' cache='false'>" -"<text font='text_default' " -"text_color='color_normal_disabled' " -"vertical_align='center' " -"horizontal_align='left' " -"/>" -"<drawstep func='circle' " -"width='7' " -"height='7' " -"radius='7' " -"bg_color='lightgrey' " -"fill='background' " -"xpos='0' " -"ypos='0' " -"/>" -"</drawdata>" -"<drawdata id='widget_default' cache='false'>" -"<drawstep func='bevelsq' " -"bevel='2' " -"/>" -"</drawdata>" -"<drawdata id='widget_small' cache='false'>" -"<drawstep func='square' " -"stroke='0' " -"/>" -"</drawdata>" -"</render_info>" "<layout_info resolution='y>399'>" "<globals>" "<def var='Line.Height' value='16' />" @@ -1873,6 +1262,617 @@ "</layout>" "</dialog>" "</layout_info>" +"<render_info>" +"<palette>" +"<color name='black' " +"rgb='0,0,0' " +"/>" +"<color name='lightgrey' " +"rgb='104,104,104' " +"/>" +"<color name='darkgrey' " +"rgb='64,64,64' " +"/>" +"<color name='green' " +"rgb='32,160,32' " +"/>" +"<color name='green2' " +"rgb='0,255,0' " +"/>" +"</palette>" +"<fonts>" +"<font id='text_default' " +"file='helvb12.bdf' " +"/>" +"<font resolution='y<400' " +"id='text_default' " +"file='clR6x12.bdf' " +"/>" +"<font id='text_button' " +"file='helvb12.bdf' " +"/>" +"<font resolution='y<400' " +"id='text_button' " +"file='clR6x12.bdf' " +"/>" +"<font id='text_normal' " +"file='helvb12.bdf' " +"/>" +"<font resolution='y<400' " +"id='text_normal' " +"file='clR6x12.bdf' " +"/>" +"<font id='tooltip_normal' " +"file='fixed5x8.bdf' " +"/>" +"<text_color id='color_normal' " +"color='green' " +"/>" +"<text_color id='color_normal_inverted' " +"color='black' " +"/>" +"<text_color id='color_normal_hover' " +"color='green2' " +"/>" +"<text_color id='color_normal_disabled' " +"color='lightgrey' " +"/>" +"<text_color id='color_alternative' " +"color='lightgrey' " +"/>" +"<text_color id='color_alternative_inverted' " +"color='255,255,255' " +"/>" +"<text_color id='color_alternative_hover' " +"color='176,176,176' " +"/>" +"<text_color id='color_alternative_disabled' " +"color='darkgrey' " +"/>" +"<text_color id='color_button' " +"color='green' " +"/>" +"<text_color id='color_button_hover' " +"color='green2' " +"/>" +"<text_color id='color_button_disabled' " +"color='lightgrey' " +"/>" +"</fonts>" +"<defaults fill='foreground' fg_color='darkgrey' bg_color='black' shadow='0' bevel_color='lightgrey'/>" +"<drawdata id='text_selection' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='lightgrey' " +"/>" +"</drawdata>" +"<drawdata id='text_selection_focus' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='green' " +"/>" +"</drawdata>" +"<drawdata id='mainmenu_bg' cache='false'>" +"<drawstep func='fill' " +"fill='foreground' " +"fg_color='black' " +"/>" +"</drawdata>" +"<drawdata id='special_bg' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"/>" +"</drawdata>" +"<drawdata id='tooltip_bg' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='foreground' " +"fg_color='black' " +"/>" +"</drawdata>" +"<drawdata id='separator' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"height='2' " +"ypos='center' " +"fg_color='lightgrey' " +"/>" +"</drawdata>" +"<drawdata id='scrollbar_base' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"/>" +"</drawdata>" +"<drawdata id='scrollbar_handle_hover' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='green2' " +"/>" +"</drawdata>" +"<drawdata id='scrollbar_handle_idle' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='green' " +"/>" +"</drawdata>" +"<drawdata id='scrollbar_button_idle' cache='false' resolution='y>399'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='10' " +"height='10' " +"xpos='right' " +"ypos='center' " +"padding='0,0,3,0' " +"orientation='top' " +"/>" +"</drawdata>" +"<drawdata id='scrollbar_button_idle' cache='false' resolution='y<400'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='5' " +"height='5' " +"xpos='right' " +"ypos='center' " +"padding='0,0,2,0' " +"orientation='top' " +"/>" +"</drawdata>" +"<drawdata id='scrollbar_button_hover' cache='false' resolution='y>399'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='10' " +"height='10' " +"xpos='right' " +"ypos='center' " +"padding='0,0,3,0' " +"orientation='top' " +"/>" +"</drawdata>" +"<drawdata id='scrollbar_button_hover' cache='false' resolution='y<400'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='5' " +"height='5' " +"xpos='right' " +"ypos='center' " +"padding='0,0,2,0' " +"orientation='top' " +"/>" +"</drawdata>" +"<drawdata id='tab_active' cache='false'>" +"<text font='text_default' " +"text_color='color_normal_hover' " +"vertical_align='center' " +"horizontal_align='center' " +"/>" +"<drawstep func='tab' " +"bevel='2' " +"radius='0' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='tab_inactive' cache='false'>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='center' " +"horizontal_align='center' " +"/>" +"<drawstep func='tab' " +"bevel='2' " +"radius='0' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='tab_background' cache='false'>" +"</drawdata>" +"<drawdata id='widget_slider' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='slider_disabled' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='lightgrey' " +"/>" +"</drawdata>" +"<drawdata id='slider_full' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='green' " +"/>" +"</drawdata>" +"<drawdata id='slider_hover' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='green2' " +"/>" +"</drawdata>" +"<drawdata id='widget_small' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='popup_idle' cache='false' resolution='y>399'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='10' " +"height='5' " +"xpos='right' " +"ypos='10' " +"padding='0,0,7,0' " +"orientation='bottom' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='10' " +"height='5' " +"xpos='right' " +"ypos='4' " +"padding='0,0,7,0' " +"orientation='top' " +"/>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"</drawdata>" +"<drawdata id='popup_idle' cache='false' resolution='y<400'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='7' " +"height='4' " +"xpos='right' " +"ypos='9' " +"padding='0,0,3,0' " +"orientation='bottom' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='7' " +"height='4' " +"xpos='right' " +"ypos='4' " +"padding='0,0,3,0' " +"orientation='top' " +"/>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"</drawdata>" +"<drawdata id='popup_disabled' cache='false' resolution='y>399'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='10' " +"height='5' " +"xpos='right' " +"ypos='10' " +"padding='0,0,7,0' " +"orientation='bottom' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='10' " +"height='5' " +"xpos='right' " +"ypos='4' " +"padding='0,0,7,0' " +"orientation='top' " +"/>" +"<text font='text_default' " +"text_color='color_normal_disabled' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"</drawdata>" +"<drawdata id='popup_disabled' cache='false' resolution='y<400'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='7' " +"height='4' " +"xpos='right' " +"ypos='9' " +"padding='0,0,3,0' " +"orientation='bottom' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='7' " +"height='4' " +"xpos='right' " +"ypos='4' " +"padding='0,0,3,0' " +"orientation='top' " +"/>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"</drawdata>" +"<drawdata id='popup_hover' cache='false' resolution='y>399'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='10' " +"height='5' " +"xpos='right' " +"ypos='10' " +"padding='0,0,7,0' " +"orientation='bottom' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='10' " +"height='5' " +"xpos='right' " +"ypos='4' " +"padding='0,0,7,0' " +"orientation='top' " +"/>" +"<text font='text_default' " +"text_color='color_normal_hover' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"</drawdata>" +"<drawdata id='popup_hover' cache='false' resolution='y<400'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='7' " +"height='4' " +"xpos='right' " +"ypos='9' " +"padding='0,0,3,0' " +"orientation='bottom' " +"/>" +"<drawstep func='triangle' " +"fg_color='green' " +"fill='foreground' " +"width='7' " +"height='4' " +"xpos='right' " +"ypos='4' " +"padding='0,0,3,0' " +"orientation='top' " +"/>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"</drawdata>" +"<drawdata id='widget_textedit' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='plain_bg' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"/>" +"</drawdata>" +"<drawdata id='caret' cache='false'>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='lightgrey' " +"/>" +"</drawdata>" +"<drawdata id='default_bg' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"/>" +"</drawdata>" +"<drawdata id='button_pressed' cache='false'>" +"<text font='text_button' " +"text_color='color_alternative_inverted' " +"vertical_align='center' " +"horizontal_align='center' " +"/>" +"<drawstep func='square' " +"fill='foreground' " +"fg_color='green' " +"/>" +"</drawdata>" +"<drawdata id='button_idle' cache='false'>" +"<text font='text_button' " +"text_color='color_button' " +"vertical_align='center' " +"horizontal_align='center' " +"/>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='button_hover' cache='false'>" +"<text font='text_button' " +"text_color='color_button_hover' " +"vertical_align='center' " +"horizontal_align='center' " +"/>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='button_disabled' cache='false'>" +"<text font='text_button' " +"text_color='color_button_disabled' " +"vertical_align='center' " +"horizontal_align='center' " +"/>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='checkbox_disabled' cache='false'>" +"<text font='text_default' " +"text_color='color_normal_disabled' " +"vertical_align='top' " +"horizontal_align='left' " +"/>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='checkbox_selected' cache='false'>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='top' " +"horizontal_align='left' " +"/>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"<drawstep func='cross' " +"fill='foreground' " +"stroke='2' " +"fg_color='green' " +"/>" +"</drawdata>" +"<drawdata id='checkbox_default' cache='false'>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='top' " +"horizontal_align='left' " +"/>" +"<drawstep func='bevelsq' " +"bevel='2' " +"fill='none' " +"/>" +"</drawdata>" +"<drawdata id='radiobutton_default' cache='false'>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"<drawstep func='circle' " +"width='7' " +"height='7' " +"radius='7' " +"fill='background' " +"bg_color='darkgrey' " +"xpos='0' " +"ypos='0' " +"/>" +"</drawdata>" +"<drawdata id='radiobutton_selected' cache='false'>" +"<text font='text_default' " +"text_color='color_normal' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"<drawstep func='circle' " +"width='7' " +"height='7' " +"radius='7' " +"fg_color='darkgrey' " +"fill='none' " +"xpos='0' " +"ypos='0' " +"/>" +"<drawstep func='circle' " +"width='7' " +"height='7' " +"radius='5' " +"fg_color='green' " +"fill='foreground' " +"xpos='2' " +"ypos='2' " +"/>" +"</drawdata>" +"<drawdata id='radiobutton_disabled' cache='false'>" +"<text font='text_default' " +"text_color='color_normal_disabled' " +"vertical_align='center' " +"horizontal_align='left' " +"/>" +"<drawstep func='circle' " +"width='7' " +"height='7' " +"radius='7' " +"bg_color='lightgrey' " +"fill='background' " +"xpos='0' " +"ypos='0' " +"/>" +"</drawdata>" +"<drawdata id='widget_default' cache='false'>" +"<drawstep func='bevelsq' " +"bevel='2' " +"/>" +"</drawdata>" +"<drawdata id='widget_small' cache='false'>" +"<drawstep func='square' " +"stroke='0' " +"/>" +"</drawdata>" +"</render_info>" "<layout_info resolution='y<400'>" "<globals>" "<def var='Line.Height' value='12' />" @@ -2506,16 +2506,16 @@ "</layout>" "</dialog>" "<dialog name='GlobalMenu' overlays='screen_center'>" -"<layout type='vertical' padding='2,2,4,6' center='true' spacing='6'>" +"<layout type='vertical' padding='2,2,2,6' center='true' spacing='0'>" "<widget name='Title' " "width='160' " -"height='4' " +"height='12' " "/>" "<widget name='Version' " "width='160' " -"height='4' " +"height='14' " "/>" -"<space size='1'/>" +"<layout type='vertical' padding='0,0,3,0' center='true' spacing='6'>" "<widget name='Load' " "width='120' " "height='12' " @@ -2551,6 +2551,7 @@ "height='12' " "/>" "</layout>" +"</layout>" "</dialog>" "<dialog name='GlobalConfig' overlays='screen_center'>" "<layout type='vertical' padding='8,8,8,8'>" diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip Binary files differindex 1085aa64a4..7115849aa0 100644 --- a/gui/themes/scummclassic.zip +++ b/gui/themes/scummclassic.zip diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx index 802998df3c..506657ef31 100644 --- a/gui/themes/scummclassic/classic_layout_lowres.stx +++ b/gui/themes/scummclassic/classic_layout_lowres.stx @@ -687,50 +687,51 @@ </dialog> <dialog name = 'GlobalMenu' overlays = 'screen_center'> - <layout type = 'vertical' padding = '2, 2, 4, 6' center = 'true' spacing='6'> + <layout type = 'vertical' padding = '2, 2, 2, 6' center = 'true' spacing='0'> <widget name = 'Title' width = '160' - height = '4' + height = '12' /> <widget name = 'Version' width = '160' - height = '4' - /> - <space size = '1'/> - <widget name = 'Load' - width = '120' - height = '12' - /> - <widget name = 'Save' - width = '120' - height = '12' - /> - <space size = '1'/> - <widget name = 'Options' - width = '120' - height = '12' - /> - <widget name = 'Help' - width = '120' - height = '12' - /> - <widget name = 'About' - width = '120' - height = '12' - /> - <space size = '1'/> - <widget name = 'Resume' - width = '120' - height = '12' - /> - <widget name = 'RTL' - width = '120' - height = '12' - /> - <widget name = 'Quit' - width = '120' - height = '12' + height = '14' /> + <layout type = 'vertical' padding = '0, 0, 3, 0' center = 'true' spacing='6'> + <widget name = 'Load' + width = '120' + height = '12' + /> + <widget name = 'Save' + width = '120' + height = '12' + /> + <space size = '1'/> + <widget name = 'Options' + width = '120' + height = '12' + /> + <widget name = 'Help' + width = '120' + height = '12' + /> + <widget name = 'About' + width = '120' + height = '12' + /> + <space size = '1'/> + <widget name = 'Resume' + width = '120' + height = '12' + /> + <widget name = 'RTL' + width = '120' + height = '12' + /> + <widget name = 'Quit' + width = '120' + height = '12' + /> + </layout> </layout> </dialog> diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp index 667850d6cc..6f550b5642 100644 --- a/gui/widgets/editable.cpp +++ b/gui/widgets/editable.cpp @@ -261,23 +261,45 @@ void EditableWidget::drawCaret(bool erase) { int x = editRect.left; int y = editRect.top; - x += getCaretOffset(); + const int caretOffset = getCaretOffset(); + x += caretOffset; - if (y < 0 || y + editRect.height() - 2 >= _h) + if (y < 0 || y + editRect.height() > _h) return; x += getAbsX(); y += getAbsY(); - g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + editRect.height() - 2), erase); + g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + editRect.height()), erase); if (erase) { + GUI::EditableWidget::String character; + int width; + if ((uint)_caretPos < _editString.size()) { - GUI::EditableWidget::String chr(_editString[_caretPos]); - int chrWidth = g_gui.getCharWidth(_editString[_caretPos], _font); + const byte chr = _editString[_caretPos]; + width = g_gui.getCharWidth(chr, _font); + character = chr; + const uint last = (_caretPos > 0) ? _editString[_caretPos - 1] : 0; - x += g_gui.getKerningOffset(last, _editString[_caretPos], _font); - g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, _inversion, 0, false, _font, ThemeEngine::kFontColorNormal, true, _textDrawableArea); + x += g_gui.getKerningOffset(last, chr, _font); + } else { + // We draw a fake space here to assure that removing the caret + // does not result in color glitches in case the edit rect is + // drawn with an inversion. + width = g_gui.getCharWidth(' ', _font); + character = " "; + } + + // TODO: Right now we manually prevent text from being drawn outside + // the edit area here. We might want to consider to use + // setTextDrawableArea for this. However, it seems that only + // EditTextWidget uses that but not ListWidget. Thus, one should check + // whether we can unify the drawing in the text area first to avoid + // possible glitches due to different methods used. + width = MIN(editRect.width() - caretOffset, width); + if (width > 0) { + g_gui.theme()->drawText(Common::Rect(x, y, x + width, y + editRect.height()), character, _state, Graphics::kTextAlignLeft, _inversion, 0, false, _font, ThemeEngine::kFontColorNormal, true, _textDrawableArea); } } diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h index 4a18d5e689..63a1942311 100644 --- a/gui/widgets/editable.h +++ b/gui/widgets/editable.h @@ -78,6 +78,11 @@ protected: virtual void startEditMode() = 0; virtual void endEditMode() = 0; virtual void abortEditMode() = 0; + /** + * The area where text input is being made. This should exactly match the + * rect with which the actual edit string is drawn otherwise nasty + * graphics glitches when redrawing the caret can occur. + */ virtual Common::Rect getEditRect() const = 0; virtual int getCaretOffset() const; void drawCaret(bool erase); diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp index 52527effd8..c54ca573ba 100644 --- a/gui/widgets/edittext.cpp +++ b/gui/widgets/edittext.cpp @@ -101,7 +101,7 @@ void EditTextWidget::drawWidget() { } Common::Rect EditTextWidget::getEditRect() const { - Common::Rect r(2 + _leftPadding, 2, _w - 2 - _leftPadding - _rightPadding, _h - 1); + Common::Rect r(2 + _leftPadding, 2, _w - 2 - _leftPadding - _rightPadding, _h); return r; } diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp index 473d5f04df..8b8eb31db9 100644 --- a/gui/widgets/list.cpp +++ b/gui/widgets/list.cpp @@ -91,6 +91,9 @@ ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const char *too // FIXME: This flag should come from widget definition _editable = true; + + _quickSelect = true; + _editColor = ThemeEngine::kFontColorNormal; } ListWidget::~ListWidget() { @@ -538,7 +541,7 @@ void ListWidget::drawWidget() { } Common::Rect ListWidget::getEditRect() const { - Common::Rect r(_hlLeftPadding, 0, _w - _hlLeftPadding - _hlRightPadding, kLineHeight - 1); + Common::Rect r(_hlLeftPadding, 0, _w - _hlLeftPadding - _hlRightPadding, kLineHeight - 2); const int offset = (_selectedItem - _currentPos) * kLineHeight + _topPadding; r.top += offset; r.bottom += offset; |