summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-21 21:27:59 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-21 21:27:59 +0000
commit58ffdbff028f763451f471639c6aecc530ca4d94 (patch)
treed2a2a3de9eb52ea25e6b4f361dbe64eaba309666 /src/gui
parentf7e4e3acb009dc09dffc98ff7b59b0260e7ecc28 (diff)
downloadmana-client-58ffdbff028f763451f471639c6aecc530ca4d94.tar.gz
mana-client-58ffdbff028f763451f471639c6aecc530ca4d94.tar.bz2
mana-client-58ffdbff028f763451f471639c6aecc530ca4d94.tar.xz
mana-client-58ffdbff028f763451f471639c6aecc530ca4d94.zip
Some cleanups and button, radiobutton and checkbox now take into account
disabled status.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/button.cpp2
-rw-r--r--src/gui/checkbox.cpp12
-rw-r--r--src/gui/radiobutton.cpp12
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;