diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/button.cpp | 2 | ||||
-rw-r--r-- | src/gui/checkbox.cpp | 12 | ||||
-rw-r--r-- | src/gui/radiobutton.cpp | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/button.cpp b/src/gui/button.cpp index c508afe2..fb1a01ec 100644 --- a/src/gui/button.cpp +++ b/src/gui/button.cpp @@ -57,7 +57,7 @@ Button::Button(const std::string& caption): void Button::draw(gcn::Graphics* graphics) { int mode; - if (false /*disabled*/) { + if (!isEnabled()) { mode = 3; } else if (isPressed()) { diff --git a/src/gui/checkbox.cpp b/src/gui/checkbox.cpp index 88b3f975..b231ec64 100644 --- a/src/gui/checkbox.cpp +++ b/src/gui/checkbox.cpp @@ -43,15 +43,15 @@ void CheckBox::drawBox(gcn::Graphics* graphics) { getAbsolutePosition(x, y); if (mMarked) { - if (false /*disabled*/) { - box = checkBoxDisabledChecked; - } else { + if (isEnabled()) { box = checkBoxChecked; + } else { + box = checkBoxDisabledChecked; } - } else if (false /*disabled*/) { - box = checkBoxDisabled; - } else { + } else if (isEnabled()) { box = checkBoxNormal; + } else { + box = checkBoxDisabled; } x += 2; diff --git a/src/gui/radiobutton.cpp b/src/gui/radiobutton.cpp index de2d4f68..a7115752 100644 --- a/src/gui/radiobutton.cpp +++ b/src/gui/radiobutton.cpp @@ -43,15 +43,15 @@ void RadioButton::drawBox(gcn::Graphics* graphics) getAbsolutePosition(x, y); if (mMarked) { - if (false /*disabled*/) { - box = radioDisabledChecked; - } else { + if (isEnabled()) { box = radioChecked; + } else { + box = radioDisabledChecked; } - } else if (false /*disabled*/) { - box = radioDisabled; - } else { + } else if (isEnabled()) { box = radioNormal; + } else { + box = radioDisabled; } x += 2; |