diff options
author | Torbjörn Andersson | 2007-07-10 17:41:40 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2007-07-10 17:41:40 +0000 |
commit | 83e038de191888758fdc2e2d741b12f1c28f7e2b (patch) | |
tree | af8c106fe1f82cccc9e9794387b285eb79b01f12 /engines | |
parent | 0a5654fefc147fb67796bf5cb33f1f761041c018 (diff) | |
download | scummvm-rg350-83e038de191888758fdc2e2d741b12f1c28f7e2b.tar.gz scummvm-rg350-83e038de191888758fdc2e2d741b12f1c28f7e2b.tar.bz2 scummvm-rg350-83e038de191888758fdc2e2d741b12f1c28f7e2b.zip |
For some reason, AgiTextColor(amigaBlack, _olderAgi? amigaOrange : amigaPurple)
caused a linking error on my computer. Worked around that, and added curly
braces for (IMO) better readability.
svn-id: r28013
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/agi.cpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 5343999727..7abeaf3f05 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -536,22 +536,31 @@ static const GameSettings agiSettings[] = { }; AgiTextColor AgiButtonStyle::getColor(bool hasFocus, bool pressed, bool positive) const { - if (_amigaStyle) - if (positive) - if (pressed) // Positive pressed Amiga-style button - return AgiTextColor(amigaBlack, _olderAgi? amigaOrange : amigaPurple); - else // Positive unpressed Amiga-style button + if (_amigaStyle) { + if (positive) { + if (pressed) { // Positive pressed Amiga-style button + if (_olderAgi) { + return AgiTextColor(amigaBlack, amigaOrange); + } else { + return AgiTextColor(amigaBlack, amigaPurple); + } + } else { // Positive unpressed Amiga-style button return AgiTextColor(amigaWhite, amigaGreen); - else // _amigaStyle && !positive - if (pressed) // Negative pressed Amiga-style button + } + } else { // _amigaStyle && !positive + if (pressed) { // Negative pressed Amiga-style button return AgiTextColor(amigaBlack, amigaCyan); - else // Negative unpressed Amiga-style button + } else { // Negative unpressed Amiga-style button return AgiTextColor(amigaWhite, amigaRed); - else // PC-style button - if (hasFocus || pressed) // A pressed or in focus PC-style button + } + } + } else { // PC-style button + if (hasFocus || pressed) { // A pressed or in focus PC-style button return AgiTextColor(pcWhite, pcBlack); - else // An unpressed PC-style button without focus + } else { // An unpressed PC-style button without focus return AgiTextColor(pcBlack, pcWhite); + } + } } AgiTextColor AgiButtonStyle::getColor(bool hasFocus, bool pressed, int baseFgColor, int baseBgColor) const { |