From 83e038de191888758fdc2e2d741b12f1c28f7e2b Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 10 Jul 2007 17:41:40 +0000 Subject: 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 --- engines/agi/agi.cpp | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'engines') 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 { -- cgit v1.2.3