From 66b565c9c2db447b3080d781ca60c12f78348dbf Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sat, 18 Jul 2009 22:17:56 +0000 Subject: Fix crash in tab completion if one command is a prefix of another. svn-id: r42597 --- gui/debugger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 181403484b..6b55681a25 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -307,7 +307,8 @@ bool Debugger::tabComplete(const char *input, Common::String &completion) const } else { // take common prefix of previous match and this command for (uint j = 0; j < completion.size(); j++) { - if (completion[j] != i->_key[inputlen + j]) { + if (inputlen + j >= i->_key.size() || + completion[j] != i->_key[inputlen + j]) { completion = Common::String(completion.begin(), completion.begin() + j); // If there is no unambiguous completion, abort if (completion.empty()) -- cgit v1.2.3 From 00af395ab6a07250c7f3e7b8870cf328c72cde47 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 19 Jul 2009 21:06:25 +0000 Subject: Fix compilation with USE_CONSOLE = 0 svn-id: r42623 --- gui/debugger.cpp | 9 ++++++++- gui/debugger.h | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 6b55681a25..dd292a3a8a 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -39,9 +39,11 @@ Debugger::Debugger() { _isAttached = false; _errStr = NULL; _firstTime = true; +#if USE_CONSOLE _debuggerDialog = new GUI::ConsoleDialog(1.0f, 0.67f); _debuggerDialog->setInputCallback(debuggerInputCallback, this); _debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this); +#endif //DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); DCmd_Register("exit", WRAP_METHOD(Debugger, Cmd_Exit)); @@ -55,7 +57,9 @@ Debugger::Debugger() { } Debugger::~Debugger() { +#if USE_CONSOLE delete _debuggerDialog; +#endif } @@ -357,8 +361,11 @@ bool Debugger::Cmd_Exit(int argc, const char **argv) { // Print a list of all registered commands (and variables, if any), // nicely word-wrapped. bool Debugger::Cmd_Help(int argc, const char **argv) { - +#if USE_CONSOLE const int charsPerLine = _debuggerDialog->getCharsPerLine(); +#else + const int charsPerLine = 80; +#endif int width, size; uint i; diff --git a/gui/debugger.h b/gui/debugger.h index e84da594be..1baf99faeb 100644 --- a/gui/debugger.h +++ b/gui/debugger.h @@ -35,7 +35,7 @@ namespace GUI { // Choose between text console or ScummConsole #define USE_CONSOLE 1 -#ifdef USE_CONSOLE +#if USE_CONSOLE class ConsoleDialog; #endif @@ -86,7 +86,9 @@ private: bool _isAttached; char *_errStr; bool _firstTime; +#if USE_CONSOLE GUI::ConsoleDialog *_debuggerDialog; +#endif protected: // Hook for subclasses: Called just before enter() is run -- cgit v1.2.3 From 4e71153249c5f2337fced281ccf47f2f7f6463b4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 22 Jul 2009 20:37:48 +0000 Subject: Fix bug #2825252: "GUI: Low Res Bugs" svn-id: r42668 --- gui/ThemeEngine.h | 2 +- gui/themes/default.inc | 1894 ++++++++++---------- gui/themes/scummclassic.zip | Bin 53307 -> 53286 bytes gui/themes/scummclassic/THEMERC | 2 +- gui/themes/scummclassic/classic_layout_lowres.stx | 12 +- gui/themes/scummmodern.zip | Bin 157995 -> 157974 bytes gui/themes/scummmodern/THEMERC | 2 +- .../scummmodern/scummmodern_layout_lowres.stx | 12 +- 8 files changed, 962 insertions(+), 962 deletions(-) (limited to 'gui') diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 75f42618a6..c2b6db7119 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -32,7 +32,7 @@ #include "graphics/surface.h" #include "graphics/fontman.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.5" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.6" namespace Graphics { struct DrawStep; diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 0331c90fbb..de9ae3a37c 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -1,403 +1,470 @@ "" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " -" " -" " -" " -" " +" " +" " -" " -" " +" " +" " -" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " -" " +" " +" " -" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " +" " +" " -" " -" " -" " +" " +" " -" " +" " +" " -" " -" " -" " +" " +" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " +" " +" " -" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " -" " -" " -" " -" " +" " -" " -" " -" " -" " -" " -" " -" " -" " +" " " " -" " -" " +" " +" " -" " -" " -" " -" " -" " " " -" " +" " +" " +" " +" " +" " " " " " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " " " " " -" " " " " " " " -" " -" " +" " +" " " " -" " +" " " " " " " " " " -" " +" " " " -" " +" " +" " -" " " " -" " -" " -" " -" " +" " +" " -" " " " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " " " " " -" " -" " -" " -" " +" " +" " +" " -" " " " -" " -" " +" " -" " " " -" " -" " +" " -" " " " -" " -" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " " " -" " -" " -" " +" " -" " -" " -" " -" " " " " " " " -" " -" " -" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " " " " " -" " +" " " " @@ -601,7 +573,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -612,511 +584,546 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " " " " " -" " -" " -" " +" " +" " +" " +" " -" " +" " " " -" " -" " +" " +" " +" " +" " -" " -" " " " -" " -" " -" " +" " +" " +" " +" " +" " -" " -" " +" " +" " +" " -" " +" " +" " +" " +" " +" " +" " +" " +" " " " " " " " -" " -" " -" " +" " +" " +" " +" " -" " -" " -" " +" " +" " +" " " " -" " -" " -" " +" " -" " -" " -" " +" " " " -" " " " -" " +" " " " -" " -" " +" " -" " -" " +" " +" " -" " +" " -" " -" " " " " " " " -" " -" " -" " -" " -" " +" " +" " +" " " " -" " +" " -" " " " " " " " -" " -" " -" " -" " -" " +" " +" " +" " " " -" " +" " +" " +" " -" " +" " +" " +" " +" " +" " +" " " " " " -" " -" " -" " -" " +" " +" " -" " +" " +" " +" " +" " +" " +" " -" " -" " +" " +" " -" " -" " -" " -" " +" " +" " +" " -" " -" " +" " +" " -" " -" " +" " +" " +" " +" " +" " +" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " +" " -" " -" " -" " -" " -" " -" " +" " -" " -" " -" " -" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " -" " +" " -" " -" " -" " -" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " -" " -" " -" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " +" " -" " +" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " +" " -" " -" " -" " +" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " -" " -" " -" " -" " +" " -" " -" " -" " -" " +" " -" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " -" " -" " +" " +" " +" " +" " +" " +" " -" " -" " -" " -" " +" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " " " -" " -" " -" " -" " +" " +" " +" " +" " " " " " " " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " " " " " +" " +" " +" " " " " " " " " " " " " " " " " " " " -" " +" " " " " " " " @@ -1163,36 +1170,37 @@ " " " " " " " " " " " " " " +" " " " " " " " " " " " " " " " " " -" " -" " +" " +" " " " @@ -1200,7 +1208,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1214,10 +1222,10 @@ " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -1238,7 +1246,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1256,7 +1264,7 @@ " " " " " " -" " +" " " " @@ -1264,7 +1272,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1272,7 +1280,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1280,16 +1288,16 @@ "type='PopUp' " "/> " " " -" " +" " " " " " " " -" " +" " " " @@ -1303,8 +1311,9 @@ " " " " " " -" " -" " +" " +" " +" " " " @@ -1315,7 +1324,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1326,7 +1335,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1337,8 +1346,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -1347,7 +1356,7 @@ " " " " " " -" " +" " " " @@ -1368,7 +1377,7 @@ " " -" " +" " " " @@ -1384,7 +1393,7 @@ " " " " " " -" " +" " " " @@ -1392,7 +1401,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1400,7 +1409,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1420,7 +1429,7 @@ " " " " " " -" " +" " " " @@ -1428,21 +1437,17 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " " " " " -" " +" " " " " " " " -" " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -1578,7 +1574,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1586,7 +1582,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1597,86 +1593,81 @@ " " " " " " -" " +" " " " " " -" " +" " +" " " " " " -" " +" " " " " " -" " -" " +" " " " " " " " " " " " " " " " -" " +" " " " " " -" " +" " " " " " " " -" " +" " " " " " " " " " " " -" " +" " +" " +" " " " @@ -1687,7 +1678,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1698,7 +1689,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1709,24 +1700,25 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " " " -" " -" " +" " +" " +" " " " " " " " -" " +" " " " @@ -1737,8 +1729,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -1753,15 +1745,23 @@ " " " " " " -" " -" " +" " +" " +" " " " -" " +" " +" " +" " " " " " -" " +" " " " @@ -1771,16 +1771,16 @@ " " " " " " -" " -" " +" " +" " " " " " -" " +" " " " @@ -1795,20 +1795,20 @@ " " " " " " -" " +" " " " " " " " -" " +" " " " @@ -1819,20 +1819,20 @@ " " " " " " -" " +" " " " " " " " " " " " " - + @@ -463,7 +463,7 @@ - + @@ -472,7 +472,7 @@ - + @@ -481,7 +481,7 @@ - + @@ -490,7 +490,7 @@ - + - + - + @@ -459,7 +459,7 @@ - + @@ -468,7 +468,7 @@ - + @@ -477,7 +477,7 @@ - + @@ -486,7 +486,7 @@ - + - + + #include #endif + namespace GUI { Debugger::Debugger() { @@ -39,7 +43,7 @@ Debugger::Debugger() { _isAttached = false; _errStr = NULL; _firstTime = true; -#if USE_CONSOLE +#ifndef USE_TEXT_CONSOLE _debuggerDialog = new GUI::ConsoleDialog(1.0f, 0.67f); _debuggerDialog->setInputCallback(debuggerInputCallback, this); _debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this); @@ -57,7 +61,7 @@ Debugger::Debugger() { } Debugger::~Debugger() { -#if USE_CONSOLE +#ifndef USE_TEXT_CONSOLE delete _debuggerDialog; #endif } @@ -69,7 +73,7 @@ int Debugger::DebugPrintf(const char *format, ...) { va_start(argptr, format); int count; -#if USE_CONSOLE +#ifndef USE_TEXT_CONSOLE count = _debuggerDialog->vprintf(format, argptr); #else count = ::vprintf(format, argptr); @@ -116,9 +120,21 @@ void Debugger::onFrame() { } } +#if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE) +static Debugger* g_readline_debugger; + +char * readline_completionFunction (const char *text, int state) +{ + return g_readline_debugger->readlineComplete(text, state); +} +#endif + // Main Debugger Loop void Debugger::enter() { -#if USE_CONSOLE + // TODO: Having three I/O methods #ifdef-ed in this file is not the + // cleanest approach to this... + +#ifndef USE_TEXT_CONSOLE if (_firstTime) { DebugPrintf("Debugger started, type 'exit' to return to the game.\n"); DebugPrintf("Type 'help' to see a little list of commands and variables.\n"); @@ -133,18 +149,28 @@ void Debugger::enter() { _debuggerDialog->runModal(); #else - // TODO: compared to the console input, this here is very bare bone. - // For example, no support for tab completion and no history. At least - // we should re-add (optional) support for the readline library. - // Or maybe instead of choosing between a console dialog and stdio, - // we should move that choice into the ConsoleDialog class - that is, - // the console dialog code could be #ifdef'ed to not print to the dialog - // but rather to stdio. This way, we could also reuse the command history - // and tab completion of the console. It would still require a lot of - // work, but at least no dependency on a 3rd party library... - printf("Debugger entered, please switch to this console for input.\n"); +#ifdef USE_READLINE + // TODO: add support for saving/loading history? + + g_readline_debugger = this; + rl_completion_entry_function = &readline_completionFunction; + + char *line_read = 0; + do { + free(line_read); + line_read = readline("debug> "); + + if (line_read && line_read[0]) + add_history(line_read); + + } while (line_read && parseCommand(line_read)); + + free(line_read); + line_read = 0; + +#else int i; char buf[256]; @@ -160,6 +186,7 @@ void Debugger::enter() { if (i == 0) continue; } while (parseCommand(buf)); +#endif #endif } @@ -330,6 +357,30 @@ bool Debugger::tabComplete(const char *input, Common::String &completion) const return true; } +#if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE) +char* Debugger::readlineComplete(const char *input, int state) +{ + static CommandsMap::const_iterator iter; + + // We assume that _cmds isn't changed between calls to readlineComplete, + // unless state is 0. + if (state == 0) { + iter = _cmds.begin(); + } else { + ++iter; + } + + for (; iter != _cmds.end(); ++iter) { + if (iter->_key.hasPrefix(input)) { + char *ret = (char *)malloc(iter->_key.size() + 1); + strcpy(ret, iter->_key.c_str()); + return ret; + } + } + return 0; +} +#endif + // Variable registration function void Debugger::DVar_Register(const Common::String &varname, void *pointer, int type, int optional) { // TODO: Filter out duplicates @@ -361,9 +412,13 @@ bool Debugger::Cmd_Exit(int argc, const char **argv) { // Print a list of all registered commands (and variables, if any), // nicely word-wrapped. bool Debugger::Cmd_Help(int argc, const char **argv) { -#if USE_CONSOLE +#ifndef USE_TEXT_CONSOLE const int charsPerLine = _debuggerDialog->getCharsPerLine(); +#elif defined(USE_READLINE) + int charsPerLine, rows; + rl_get_screen_size(&rows, &charsPerLine); #else + // Can we do better? const int charsPerLine = 80; #endif int width, size; @@ -460,7 +515,7 @@ bool Debugger::Cmd_DebugFlagDisable(int argc, const char **argv) { } // Console handler -#if USE_CONSOLE +#ifndef USE_TEXT_CONSOLE bool Debugger::debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon) { Debugger *debugger = (Debugger *)refCon; diff --git a/gui/debugger.h b/gui/debugger.h index 1baf99faeb..81a85a7243 100644 --- a/gui/debugger.h +++ b/gui/debugger.h @@ -32,10 +32,7 @@ namespace GUI { -// Choose between text console or ScummConsole -#define USE_CONSOLE 1 - -#if USE_CONSOLE +#ifndef USE_TEXT_CONSOLE class ConsoleDialog; #endif @@ -86,7 +83,7 @@ private: bool _isAttached; char *_errStr; bool _firstTime; -#if USE_CONSOLE +#ifndef USE_TEXT_CONSOLE GUI::ConsoleDialog *_debuggerDialog; #endif @@ -120,11 +117,15 @@ protected: bool Cmd_DebugFlagEnable(int argc, const char **argv); bool Cmd_DebugFlagDisable(int argc, const char **argv); -#if USE_CONSOLE +#ifndef USE_TEXT_CONSOLE private: static bool debuggerInputCallback(GUI::ConsoleDialog *console, const char *input, void *refCon); static bool debuggerCompletionCallback(GUI::ConsoleDialog *console, const char *input, Common::String &completion, void *refCon); +#elif defined(USE_READLINE) +public: + char* readlineComplete(const char *input, int state); #endif + }; } // End of namespace GUI -- cgit v1.2.3 From 5870635ba6694807adee8009b7b7b8517b6763d2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 26 Jul 2009 07:07:35 +0000 Subject: Formatting. svn-id: r42792 --- gui/debugger.cpp | 10 +++++----- gui/debugger.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'gui') diff --git a/gui/debugger.cpp b/gui/debugger.cpp index a7dd9b2411..78ada04cd6 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -121,12 +121,13 @@ void Debugger::onFrame() { } #if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE) -static Debugger* g_readline_debugger; +namespace { +Debugger *g_readline_debugger; -char * readline_completionFunction (const char *text, int state) -{ +char *readline_completionFunction(const char *text, int state) { return g_readline_debugger->readlineComplete(text, state); } +} // end of anonymous namespace #endif // Main Debugger Loop @@ -358,8 +359,7 @@ bool Debugger::tabComplete(const char *input, Common::String &completion) const } #if defined(USE_TEXT_CONSOLE) && defined(USE_READLINE) -char* Debugger::readlineComplete(const char *input, int state) -{ +char *Debugger::readlineComplete(const char *input, int state) { static CommandsMap::const_iterator iter; // We assume that _cmds isn't changed between calls to readlineComplete, diff --git a/gui/debugger.h b/gui/debugger.h index 81a85a7243..07fdddb808 100644 --- a/gui/debugger.h +++ b/gui/debugger.h @@ -123,7 +123,7 @@ private: static bool debuggerCompletionCallback(GUI::ConsoleDialog *console, const char *input, Common::String &completion, void *refCon); #elif defined(USE_READLINE) public: - char* readlineComplete(const char *input, int state); + char *readlineComplete(const char *input, int state); #endif }; -- cgit v1.2.3 From 41139100a2c175929f8e85f6a7d26c4ee0974ac8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 29 Jul 2009 08:55:17 +0000 Subject: GUI: When clicking in a scrollbar to page up/down, don't scroll a full page; rather scroll a full page minus one line (see FR #2821508). This matches the behavior of the page up/down keys svn-id: r42881 --- gui/ScrollBarWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/ScrollBarWidget.cpp b/gui/ScrollBarWidget.cpp index 6e27535bfd..f6b36b3aa0 100644 --- a/gui/ScrollBarWidget.cpp +++ b/gui/ScrollBarWidget.cpp @@ -63,9 +63,9 @@ void ScrollBarWidget::handleMouseDown(int x, int y, int button, int clickCount) _currentPos++; _draggingPart = kDownArrowPart; } else if (y < _sliderPos) { - _currentPos -= _entriesPerPage; + _currentPos -= _entriesPerPage - 1; } else if (y >= _sliderPos + _sliderHeight) { - _currentPos += _entriesPerPage; + _currentPos += _entriesPerPage - 1; } else { _draggingPart = kSliderPart; _sliderDeltaMouseDownPos = y - _sliderPos; -- cgit v1.2.3 From 8bf0424832aaeb55f90af4332e5e02e4d69f58ce Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 29 Jul 2009 09:19:56 +0000 Subject: Sort audio output rates numerically (see FR #2821525) svn-id: r42886 --- gui/options.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/options.cpp b/gui/options.cpp index 5991a204e9..0d2d6e0120 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -68,8 +68,8 @@ enum { static const char *savePeriodLabels[] = { "Never", "every 5 mins", "every 10 mins", "every 15 mins", "every 30 mins", 0 }; static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1 }; -static const char *outputRateLabels[] = { "", "22 kHz", "8 kHz", "11kHz", "44 kHz", "48 kHz", 0 }; -static const int outputRateValues[] = { 0, 22050, 8000, 11025, 44100, 48000, -1 }; +static const char *outputRateLabels[] = { "", "8 kHz", "11kHz", "22 kHz", "44 kHz", "48 kHz", 0 }; +static const int outputRateValues[] = { 0, 8000, 11025, 22050, 44100, 48000, -1 }; -- cgit v1.2.3 From b09ec67fc4feeafa22238125113f40ea5de14011 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 30 Jul 2009 15:12:42 +0000 Subject: Add tanoku to our GUI credits section. svn-id: r42929 --- gui/credits.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 172d44603d..9d3d8167c8 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -185,6 +185,7 @@ static const char *credits[] = { "C0""Eugene Sandulenko", "", "C1""GUI", +"C0""Vicent Marti", "C0""Eugene Sandulenko", "C0""Johannes Schickel", "", @@ -425,6 +426,8 @@ static const char *credits[] = { "C2""Initial MI1 CD music support", "C0""Quietust", "C2""Sound support for Amiga SCUMM V2/V3 games, MM NES support", +"C0""segra", +"C2""Improved support for Apple II/C64 versions of MM", "C0""Andreas R\366ver", "C2""Broken Sword 1/2 MPEG2 cutscene support", "C0""Edward Rudd", -- cgit v1.2.3 From d6d5da0d9f13fdac51bafbe45785c06634b43658 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 30 Jul 2009 19:43:36 +0000 Subject: Change code to use our fractional utilities. svn-id: r42940 --- gui/ListWidget.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 3d4c10859f..7551acac48 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -24,6 +24,8 @@ #include "common/system.h" #include "common/events.h" +#include "common/frac.h" + #include "gui/ListWidget.h" #include "gui/ScrollBarWidget.h" #include "gui/dialog.h" @@ -538,13 +540,15 @@ void ListWidget::reflowLayout() { // of the list. // We do a rough rounding on the decimal places of Entries Per Page, // to add another entry even if it goes a tad over the padding. - _entriesPerPage = ((_h - _topPadding - _bottomPadding) << 16) / kLineHeight; + frac_t entriesPerPage = intToFrac(_h - _topPadding - _bottomPadding) / kLineHeight; - if ((uint)(_entriesPerPage & 0xFFFF) >= 0xF000) - _entriesPerPage += (1 << 16); + // Our threshold before we add another entry is 0.9375 (0xF000 with FRAC_BITS being 16). + const frac_t threshold = intToFrac(15) / 16; - _entriesPerPage >>= 16; + if ((frac_t)(entriesPerPage & FRAC_LO_MASK) >= threshold) + entriesPerPage += FRAC_ONE; + _entriesPerPage = fracToInt(entriesPerPage); assert(_entriesPerPage > 0); delete[] _textWidth; -- cgit v1.2.3 From 387afcc113cf48a0660fd92b02f0024d2f939286 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 30 Jul 2009 19:43:53 +0000 Subject: Fix Browser dialog name. svn-id: r42941 --- gui/browser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/browser.cpp b/gui/browser.cpp index 48382e880b..f4719f4850 100644 --- a/gui/browser.cpp +++ b/gui/browser.cpp @@ -43,7 +43,7 @@ enum { */ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser) - : Dialog("browser") { + : Dialog("Browser") { _titleRef = CFStringCreateWithCString(0, title, CFStringGetSystemEncoding()); _isDirBrowser = dirBrowser; } -- cgit v1.2.3 From c232783dd167493359667103de5034aaabeb2897 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 30 Jul 2009 20:46:43 +0000 Subject: Overhauled the credits: Retired members are now (partially) back to their old sections, to make sure people really see all people who contribute to an engine/backend. Also added&fixed some entries, and moved the FreeSCI section svn-id: r42943 --- gui/credits.h | 233 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 127 insertions(+), 106 deletions(-) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 9d3d8167c8..522027a173 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -16,6 +16,12 @@ static const char *credits[] = { "C1""Engine Teams", "C1""SCUMM", "C0""Torbj\366rn Andersson", +"C0""James Brown", +"C2""(retired)", +"C0""Jonathan Gray", +"C2""(retired)", +"C0""Vincent Hamm", +"C2""(retired)", "C0""Max Horn", "C0""Travis Howell", "C0""Pawel Kolodziejski", @@ -23,8 +29,12 @@ static const char *credits[] = { "C0""Gregory Montoir", "C0""Eugene Sandulenko", "C2""FT INSANE, MM NES, MM C64, game detection, Herc/CGA", +"C0""Ludvig Strigeus", +"C2""(retired)", "", "C1""HE", +"C0""Jonathan Gray", +"C2""(retired)", "C0""Travis Howell", "C0""Gregory Montoir", "C0""Eugene Sandulenko", @@ -37,37 +47,54 @@ static const char *credits[] = { "C0""Walter van Niftrik", "C0""Kari Salminen", "C0""Eugene Sandulenko", +"C0""David Symonds", +"C2""(retired)", "", "C1""AGOS", "C0""Torbj\366rn Andersson", "C0""Paul Gilbert", "C0""Travis Howell", +"C0""Oliver Kiehl", +"C2""(retired)", +"C0""Ludvig Strigeus", +"C2""(retired)", "", "C1""BASS", +"C0""Robert G\366ffringmann", +"C2""(retired)", +"C0""Oliver Kiehl", +"C2""(retired)", "C0""Joost Peters", "", "C1""Broken Sword 1", +"C0""Robert G\366ffringmann", +"C2""(retired)", "", "C1""Broken Sword 2", "C0""Torbj\366rn Andersson", +"C0""Jonathan Gray", +"C2""(retired)", "", "C1""Cinematique evo 1", "C0""Vincent Hamm", -"C2""original CinE engine author", +"C2""(retired)", "C0""Pawel Kolodziejski", "C0""Gregory Montoir", +"C0""Kari Salminen", "C0""Eugene Sandulenko", "", "C1""Cinematique evo 2", -"C0""Vincent Hamm", -"C2""original CruisE engine author", "C0""Paul Gilbert", +"C0""Vincent Hamm", +"C2""(retired)", "", "C1""Drascula", "C0""Filippos Karapetis", "C0""Pawel Kolodziejski", "", "C1""FOTAQ", +"C0""David Eriksson", +"C2""(retired)", "C0""Gregory Montoir", "C0""Joost Peters", "", @@ -108,7 +135,6 @@ static const char *credits[] = { "", "C1""SAGA", "C0""Torbj\366rn Andersson", -"C0""Sven Hesse", "C0""Filippos Karapetis", "C0""Andrew Kurushin", "C0""Eugene Sandulenko", @@ -157,9 +183,13 @@ static const char *credits[] = { "C0""Chris Apers", "", "C1""PocketPC / WinCE", +"C0""Nicolas Bacca", +"C2""(retired)", "C0""Kostas Nakos", "", "C1""PlayStation 2", +"C0""Robert G\366ffringmann", +"C2""(retired)", "C0""Max Lingua", "", "C1""PSP (PlayStation Portable)", @@ -191,17 +221,22 @@ static const char *credits[] = { "", "C1""Miscellaneous", "C0""David Corrales-Lopez", -"C2""Filesystem access improvements (GSoC 2007 task)", +"C2""Filesystem access improvements (GSoC 2007 task) (retired)", "C0""Jerome Fisher", -"C2""MT-32 emulator", +"C2""MT-32 emulator (retired)", +"C0""Benjamin Haisch", +"C2""Heavily improved de-/encoder for DXA videos", "C0""Jochen Hoenicke", -"C2""Speaker & PCjr sound support, AdLib work", +"C2""Speaker & PCjr sound support, AdLib work (retired)", "C0""Chris Page", -"C2""Return to launcher, savestate improvements, leak fixes, ... (GSoC 2008 task)", +"C2""Return to launcher, savestate improvements, leak fixes, ... (GSoC 2008 task) (retired)", "C0""Robin Watts", "C2""ARM assembly routines for nice speedups on several ports; improvements to the sound mixer", "", "", +"C1""Website (code)", +"C0""Fredrik Wendel", +"", "C1""Website (content)", "C0""All active team members", "C0""", @@ -212,126 +247,34 @@ static const char *credits[] = { "C0""Matthew Hoops", "C2""Wiki editor", "", -"C1""FreeSCI Contributors", -"C0""Anders Baden Nielsen", -"C2""PPC testing", -"C0""Bas Zoetekouw", -"C2""Man pages, debian package management, CVS maintenance", -"C0""Carl Muckenhoupt", -"C2""Sources to the SCI resource viewer tools that started it all", -"C0""Chris Kehler", -"C2""Makefile enhancements", -"C0""Christoph Reichenbach", -"C2""UN*X code, VM/Graphics/Sound/other infrastructure", -"C0""Christopher T. Lansdown", -"C2""Original CVS maintainer, Alpha compatibility fixes", -"C0""Claudio Matsuoka", -"C2""CVS snapshots, daily builds, BeOS and cygwin ports", -"C0""Dark Minister", -"C2""SCI research (bytecode and parser)", -"C0""Dmitry Jemerov", -"C2""Port to the Win32 platform, numerous bugfixes", -"C0""Emmanuel Jeandel", -"C2""Bugfixes and bug reports", -"C0""Francois-R Boyer", -"C2""MT-32 information and mapping code", -"C0""George Reid", -"C2""FreeBSD package management", -"C0""Hubert Maier", -"C2""AmigaOS 4 port", -"C0""Hugues Valois", -"C2""Game selection menu", -"C0""Johannes Manhave", -"C2""Document format translation", -"C0""Jordi Vilalta", -"C2""Numerous code and website clean-up patches", -"C0""Lars Skovlund", -"C2""Project maintenance, most documentation, bugfixes, SCI1 support", -"C0""Magnus Reftel", -"C2""Heap implementation, Python class viewer, bugfixes", -"C0""Matt Hargett", -"C2""Clean-ups, bugfixes, Hardcore QA, Win32", -"C0""Max Horn", -"C2""SetJump implementation", -"C0""Paul David Doherty", -"C2""Game version information", -"C0""Petr Vyhnak", -"C2""The DCL-INFLATE algorithm, many Win32 improvements", -"C0""Rainer Canavan", -"C2""IRIX MIDI driver and bug fixes", -"C0""Rainer De Temple", -"C2""SCI research", -"C0""Ravi I.", -"C2""SCI0 sound resource specification", -"C0""Ruediger Hanke", -"C2""Port to the MorphOS platform", -"C0""Rune Orsval", -"C2""Configuration file editor", -"C0""Rickard Lind", -"C2""MT32->GM MIDI mapping magic, sound research", -"C0""Rink Springer", -"C2""Port to the DOS platform, several bug fixes", -"C0""Robey Pointer", -"C2""Bug tracking system hosting", -"C0""Sergey Lapin", -"C2""Port of Carl's type 2 decompression code", -"C0""Solomon Peachy", -"C2""SDL ports and much of the sound subsystem", -"C0""Vyacheslav Dikonov", -"C2""Config script improvements", -"C0""Walter van Niftrik", -"C2""Ports to the Dreamcast and GP32 platforms", -"C0""Xiaojun Chen", -"C0""Sean Terrell", -"C0""Special thanks to Prof. Dr. Gary Nutt for allowing the FreeSCI VM extension as a course project in his Advanced OS course", -"C0""", -"C0""Special thanks to Bob Heitman and Corey Cole for their support of FreeSCI", -"C0""", -"", "C1""Retired Team Members", -"C0""Tore Anderson", -"C2""Former Debian GNU/Linux maintainer", -"C0""Nicolas Bacca", -"C2""Former WinCE porter", "C0""Ralph Brorsen", "C2""Help with GUI implementation", "C0""Jamieson Christian", "C2""iMUSE, MIDI, all things musical", -"C0""David Eriksson", -"C2""Engines: FOTAQ", -"C0""Hans-J\366rg Frieden", -"C2""Former AmigaOS 4 packager", -"C0""Robert G\366ffringmann", -"C2""Original PS2 porter; Engines: BASS, BS1", -"C0""Jonathan Gray", -"C2""Engines: SCUMM, HE, BS2", -"C0""R\374diger Hanke", -"C2""Port: MorphOS", "C0""Felix Jakschitsch", "C2""Zak256 reverse engineering", -"C0""Oliver Kiehl", -"C2""Engines: AGOS, BASS", "C0""Mutwin Kraus", "C2""Original MacOS porter", "C0""Peter Moraliyski", "C2""Port: GP32", -"C0""Juha Niemim\344ki", -"C2""Former AmigaOS 4 packager", "C0""Jeremy Newman", "C2""Former webmaster", "C0""Lionel Ulmer", "C2""Port: X11", "C0""Won Star", "C2""Former GP32 porter", -"C0""David Symonds", -"C2""Engines: AGI", "", "", "C1""Other contributions", "", "C1""Packages", "C1""AmigaOS 4", +"C0""Hans-J\366rg Frieden", +"C2""(retired)", "C0""Hubert Maier", +"C0""Juha Niemim\344ki", +"C2""(retired)", "", "C1""Atari/FreeMiNT", "C0""Keith Scroggins", @@ -341,6 +284,8 @@ static const char *credits[] = { "C0""Luc Schrijvers", "", "C1""Debian GNU/Linux", +"C0""Tore Anderson", +"C2""(retired)", "C0""David Weinehall", "", "C1""Fedora / RedHat", @@ -355,6 +300,8 @@ static const char *credits[] = { "", "C1""MorphOS", "C0""Fabien Coeurjoly", +"C0""R\374diger Hanke", +"C2""(retired)", "", "C1""OS/2", "C0""Paul Smedley", @@ -400,8 +347,6 @@ static const char *credits[] = { "C2""CinE engine objectification", "C0""Thomas Fach-Pedersen", "C2""ProTracker module player", -"C0""Benjamin Haisch", -"C2""Heavily improved de-/encoder for DXA videos", "C0""Janne Huttunen", "C2""V3 actor mask support, Dig/FT SMUSH audio", "C0""Kov\341cs Endre J\341nos", @@ -437,6 +382,82 @@ static const char *credits[] = { "C0""Andr\351 Souza", "C2""SDL-based OpenGL renderer", "", +"C1""FreeSCI Contributors", +"C0""Anders Baden Nielsen", +"C2""PPC testing", +"C0""Bas Zoetekouw", +"C2""Man pages, debian package management, CVS maintenance", +"C0""Carl Muckenhoupt", +"C2""Sources to the SCI resource viewer tools that started it all", +"C0""Chris Kehler", +"C2""Makefile enhancements", +"C0""Christoph Reichenbach", +"C2""UN*X code, VM/Graphics/Sound/other infrastructure", +"C0""Christopher T. Lansdown", +"C2""Original CVS maintainer, Alpha compatibility fixes", +"C0""Claudio Matsuoka", +"C2""CVS snapshots, daily builds, BeOS and cygwin ports", +"C0""Dark Minister", +"C2""SCI research (bytecode and parser)", +"C0""Dmitry Jemerov", +"C2""Port to the Win32 platform, numerous bugfixes", +"C0""Emmanuel Jeandel", +"C2""Bugfixes and bug reports", +"C0""Francois-R Boyer", +"C2""MT-32 information and mapping code", +"C0""George Reid", +"C2""FreeBSD package management", +"C0""Hubert Maier", +"C2""AmigaOS 4 port", +"C0""Hugues Valois", +"C2""Game selection menu", +"C0""Johannes Manhave", +"C2""Document format translation", +"C0""Jordi Vilalta", +"C2""Numerous code and website clean-up patches", +"C0""Lars Skovlund", +"C2""Project maintenance, most documentation, bugfixes, SCI1 support", +"C0""Magnus Reftel", +"C2""Heap implementation, Python class viewer, bugfixes", +"C0""Matt Hargett", +"C2""Clean-ups, bugfixes, Hardcore QA, Win32", +"C0""Max Horn", +"C2""SetJump implementation", +"C0""Paul David Doherty", +"C2""Game version information", +"C0""Petr Vyhnak", +"C2""The DCL-INFLATE algorithm, many Win32 improvements", +"C0""Rainer Canavan", +"C2""IRIX MIDI driver and bug fixes", +"C0""Rainer De Temple", +"C2""SCI research", +"C0""Ravi I.", +"C2""SCI0 sound resource specification", +"C0""Ruediger Hanke", +"C2""Port to the MorphOS platform", +"C0""Rune Orsval", +"C2""Configuration file editor", +"C0""Rickard Lind", +"C2""MT32->GM MIDI mapping magic, sound research", +"C0""Rink Springer", +"C2""Port to the DOS platform, several bug fixes", +"C0""Robey Pointer", +"C2""Bug tracking system hosting", +"C0""Sergey Lapin", +"C2""Port of Carl's type 2 decompression code", +"C0""Solomon Peachy", +"C2""SDL ports and much of the sound subsystem", +"C0""Vyacheslav Dikonov", +"C2""Config script improvements", +"C0""Walter van Niftrik", +"C2""Ports to the Dreamcast and GP32 platforms", +"C0""Xiaojun Chen", +"C0""Sean Terrell", +"C0""Special thanks to Prof. Dr. Gary Nutt for allowing the FreeSCI VM extension as a course project in his Advanced OS course.", +"C0""", +"C0""Special thanks to Bob Heitman and Corey Cole for their support of FreeSCI.", +"C0""", +"", "C0""And to all the contributors, users, and beta testers we've missed. Thanks!", "C0""", "", -- cgit v1.2.3 From 745afbf5657dfb8f4c877121a52f87ff72108955 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 30 Jul 2009 20:58:32 +0000 Subject: Changed 10rdH070's nick back to LordHoto, and added Hkz to the credits svn-id: r42946 --- gui/credits.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index 522027a173..c186eae883 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -67,11 +67,15 @@ static const char *credits[] = { "C0""Joost Peters", "", "C1""Broken Sword 1", +"C0""Fabio Battaglia", +"C2""PSX version support", "C0""Robert G\366ffringmann", "C2""(retired)", "", "C1""Broken Sword 2", "C0""Torbj\366rn Andersson", +"C0""Fabio Battaglia", +"C2""PSX version support", "C0""Jonathan Gray", "C2""(retired)", "", @@ -150,6 +154,8 @@ static const char *credits[] = { "", "C1""Tinsel", "C0""Torbj\366rn Andersson", +"C0""Fabio Battaglia", +"C2""PSX version support", "C0""Paul Gilbert", "C0""Sven Hesse", "C0""Max Horn", -- cgit v1.2.3 From a411a5750e98697dc64da4c528ffe57dff7c9bbb Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 30 Jul 2009 21:04:46 +0000 Subject: Added Strangerke to credits, and moved wjp from Gob to SCI on his request svn-id: r42947 --- gui/credits.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/credits.h b/gui/credits.h index c186eae883..5ddae4ea37 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -104,8 +104,8 @@ static const char *credits[] = { "", "C1""Gob", "C0""Torbj\366rn Andersson", +"C0""Arnaud Boutonn\351", "C0""Sven Hesse", -"C0""Willem Jan Palenstijn", "C0""Eugene Sandulenko", "", "C1""Groovie", @@ -149,6 +149,7 @@ static const char *credits[] = { "C0""Max Horn", "C0""Filippos Karapetis", "C0""Walter van Niftrik", +"C0""Willem Jan Palenstijn", "C0""Jordi Vilalta Prat", "C0""Lars Skovlund", "", -- cgit v1.2.3 From 44a3d917e8421d7b35c51f0d9c270395c5ea2b1a Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Thu, 30 Jul 2009 23:42:12 +0000 Subject: Fixed corrupted theme files. svn-id: r42953 --- gui/themes/default.inc | 1914 +++++++++++++++++++++---------------------- gui/themes/scummclassic.zip | Bin 53286 -> 53283 bytes gui/themes/scummmodern.zip | Bin 157974 -> 157971 bytes 3 files changed, 957 insertions(+), 957 deletions(-) (limited to 'gui') diff --git a/gui/themes/default.inc b/gui/themes/default.inc index de9ae3a37c..2cc5b3a385 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -1,470 +1,403 @@ "" -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " -" " -" " -" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " +" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " -" " -" " -" " -" " +" " +" " -" " -" " +" " -" " -" " -" " -" " +" " +" " +" " +" " +" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " -" " +" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " +" " -" " -" " -" " +" " -" " -" " -" " +" " +" " +" " +" " +" " +" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " +" " +" " +" " -" " " " -" " -" " -" " +" " -" " -" " +" " +" " +" " +" " +" " +" " -" " " " -" " -" " +" " -" " -" " +" " +" " -" " " " +" " " " " " -" " -" " -" " +" " +" " -" " +" " -" " -" " -" " +" " +" " " " " " -" " " " " " " " -" " -" " +" " +" " " " -" " +" " " " " " " " " " -" " +" " " " -" " -" " -" " -" " -" " -" " -" " +" " " " -" " +" " +" " +" " -" " +" " +" " +" " +" " +" " +" " " " " " -" " +" " " " -" " -" " -" " +" " " " -" " -" " +" " +" " +" " +" " -" " " " -" " -" " +" " -" " " " -" " -" " +" " -" " " " -" " -" " +" " -" " -" " " " " " " " -" " -" " -" " -" " -" " +" " +" " +" " -" " " " -" " -" " -" " +" " -" " " " -" " -" " +" " -" " -" " -" " -" " -" " -" " " " " " " " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " +" " -" " -" " -" " +" " -" " -" " +" " +" " -" " " " " " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " +" " -" " -" " -" " -" " +" " -" " -" " -" " -" " -" " +" " " " -" " " " -" " -" " -" " -" " +" " +" " +" " +" " +" " -" " +" " " " -" " -" " +" " -" " +" " " " -" " -" " +" " -" " +" " " " -" " +" " +" " " " -" " -" " -" " -" " +" " +" " +" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " -" " +" " " " @@ -724,406 +656,467 @@ " " " " " " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " " " +" " +" " " " -" " " " " " " " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " " " " " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " -" " " " -" " -" " -" " +" " +" " +" " +" " +" " -" " " " -" " -" " -" " " " -" " " " -" " -" " -" " -" " +" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " -" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " +" " +" " -" " -" " +" " +" " -" " +" " +" " -" " -" " +" " +" " -" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " +" " +" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " +" " +" " +" " +" " -" " +" " +" " -" " +" " +" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " +" " +" " -" " +" " +" " -" " -" " -" " +" " +" " +" " +" " +" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " +" " +" " -" " +" " +" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " +" " +" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " +" " +" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " -" " -" " -" " +" " +" " -" " -" " -" " -" " +" " +" " +" " " " -" " -" " -" " -" " +" " +" " +" " +" " " " " " " " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " " " " " -" " -" " -" " " " " " " " " " " " " " " " " " " " -" " +" " " " " " " " @@ -1170,37 +1163,36 @@ " " " " " " " " " " " " " " -" " " " " " " " " " " " " " " " " " -" " -" " +" " +" " " " @@ -1208,7 +1200,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1222,10 +1214,10 @@ " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -1246,7 +1238,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1264,7 +1256,7 @@ " " " " " " -" " +" " " " @@ -1272,7 +1264,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1280,7 +1272,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1288,16 +1280,16 @@ "type='PopUp' " "/> " " " -" " +" " " " " " " " -" " +" " " " @@ -1311,9 +1303,8 @@ " " " " " " -" " -" " -" " +" " +" " " " @@ -1324,7 +1315,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1335,7 +1326,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1346,8 +1337,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -1356,7 +1347,7 @@ " " " " " " -" " +" " " " @@ -1377,7 +1368,7 @@ " " -" " +" " " " @@ -1393,7 +1384,7 @@ " " " " " " -" " +" " " " @@ -1401,7 +1392,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1409,7 +1400,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1429,7 +1420,7 @@ " " " " " " -" " +" " " " @@ -1437,17 +1428,21 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -1505,7 +1500,7 @@ " " " " " " -" " +" " " " @@ -1513,7 +1508,7 @@ " " " " " " -" " +" " " " @@ -1521,7 +1516,7 @@ " " " " " " -" " +" " " " @@ -1529,34 +1524,43 @@ " " " " " " -" " -" " +" " +" " " " " " " " -" " +" " " " " " " " -" " +" " +" " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " @@ -1574,7 +1578,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1582,7 +1586,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1593,81 +1597,86 @@ " " " " " " -" " +" " " " " " -" " -" " +" " " " " " -" " +" " " " " " +" " +" " -" " " " " " " " " " " " " " " " -" " +" " " " " " -" " +" " " " " " " " -" " +" " " " " " " " " " " " -" " -" " -" " +" " " " @@ -1678,7 +1687,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1689,7 +1698,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1700,25 +1709,24 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " " " -" " -" " -" " +" " +" " " " " " " " -" " +" " " " @@ -1729,8 +1737,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -1745,23 +1753,15 @@ " " " " " " -" " -" " -" " +" " +" " " " -" " -" " -" " +" " " " " " -" " +" " " " @@ -1771,16 +1771,16 @@ " " " " " " -" " -" " +" " +" " " " " " -" " +" " " " @@ -1795,20 +1795,20 @@ " " " " " " -" " +" " " " " " " " -" " +" " " " @@ -1819,20 +1819,20 @@ " " " " " " -" " +" " " " " " " " " " " " " 53291 bytes gui/themes/scummclassic/classic_layout.stx | 2 +- gui/themes/scummmodern.zip | Bin 157971 -> 157979 bytes gui/themes/scummmodern/scummmodern_layout.stx | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 2cc5b3a385..64fb0e517a 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -1,5 +1,5 @@ "" -" " +" " " " " " " " diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip index 4669785093..0e1d8c539d 100644 Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index e886a1a2f0..029c7479ac 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -23,7 +23,7 @@ - $Id$ - --> - + diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index f7b65f0d31..fb3a0b1c2d 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 8c13217c65..e6a01d12a1 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -23,7 +23,7 @@ - $Id$ - --> - + -- cgit v1.2.3 From 65a39cc2b0ebb989444330c561743ba0466c1a9c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 8 Aug 2009 18:01:44 +0000 Subject: Implement FR#2821534: "GUI: Mute All disable volume sliders" svn-id: r43131 --- gui/options.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/options.cpp b/gui/options.cpp index 0d2d6e0120..e941cd6244 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -48,6 +48,7 @@ enum { kMidiGainChanged = 'mgch', kMusicVolumeChanged = 'muvc', kSfxVolumeChanged = 'sfvc', + kMuteAllChanged = 'mute', kSubtitleToggle = 'sttg', kSubtitleSpeedChanged = 'stsc', kSpeechVolumeChanged = 'vcvc', @@ -454,6 +455,10 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data _speechVolumeLabel->setValue(_speechVolumeSlider->getValue()); _speechVolumeLabel->draw(); break; + case kMuteAllChanged: + // 'true' because if control is disabled then event do not pass + setVolumeSettingsState(true); + break; case kSubtitleToggle: if (_subMode < 2) _subMode++; @@ -535,7 +540,7 @@ void OptionsDialog::setVolumeSettingsState(bool enabled) { _enableVolumeSettings = enabled; - ena = enabled; + ena = enabled && !_muteCheckbox->getState(); if (_guioptions & Common::GUIO_NOMUSIC) ena = false; @@ -543,7 +548,7 @@ void OptionsDialog::setVolumeSettingsState(bool enabled) { _musicVolumeSlider->setEnabled(ena); _musicVolumeLabel->setEnabled(ena); - ena = enabled; + ena = enabled && !_muteCheckbox->getState(); if (_guioptions & Common::GUIO_NOSFX) ena = false; @@ -551,7 +556,7 @@ void OptionsDialog::setVolumeSettingsState(bool enabled) { _sfxVolumeSlider->setEnabled(ena); _sfxVolumeLabel->setEnabled(ena); - ena = enabled; + ena = enabled && !_muteCheckbox->getState(); if (_guioptions & Common::GUIO_NOSPEECH) ena = false; @@ -701,7 +706,7 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const String &prefix) { _musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume); _musicVolumeLabel->setFlags(WIDGET_CLEARBG); - _muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", "Mute All", 0, 0); + _muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", "Mute All", kMuteAllChanged, 0); _sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", "SFX volume:"); -- cgit v1.2.3