diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-16 00:38:41 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-16 00:38:41 +0000 |
commit | dc7b347b0d77a8c74f302e48ea980ec8014df3dd (patch) | |
tree | 02fb1f04df782a265e8a2a5ca8ce0b1a544b3e5a /src/gui/mw_button.cpp | |
parent | 8d7e6dab6f6251b599741ef2f94a398dace2bca7 (diff) | |
download | mana-dc7b347b0d77a8c74f302e48ea980ec8014df3dd.tar.gz mana-dc7b347b0d77a8c74f302e48ea980ec8014df3dd.tar.bz2 mana-dc7b347b0d77a8c74f302e48ea980ec8014df3dd.tar.xz mana-dc7b347b0d77a8c74f302e48ea980ec8014df3dd.zip |
Skinned checkbox similar to what it used to be.
Diffstat (limited to 'src/gui/mw_button.cpp')
-rw-r--r-- | src/gui/mw_button.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/mw_button.cpp b/src/gui/mw_button.cpp index da767dec..f7a01176 100644 --- a/src/gui/mw_button.cpp +++ b/src/gui/mw_button.cpp @@ -29,10 +29,12 @@ MWButton::MWButton(const std::string& caption): } void MWButton::draw(gcn::Graphics* graphics) { - gcn::Rectangle screenRect = getScreenDimension(this); + int x, y; int mode; int offset = 0; + getAbsolutePosition(x, y); + if (false /*disabled*/) { mode = 3; } @@ -48,13 +50,11 @@ void MWButton::draw(gcn::Graphics* graphics) { } draw_skinned_rect(gui_bitmap, &gui_skin.button.background[mode], - screenRect.x, screenRect.y, - screenRect.width, screenRect.height); + x, y, getWidth(), getHeight()); int rtm = alfont_text_mode(-1); gui_text(gui_bitmap, getCaption().c_str(), - screenRect.x + 2 + offset, - screenRect.y + 4 + offset, + x + 2 + offset, y + 4 + offset, gui_skin.button.textcolor[mode], FALSE); alfont_text_mode(rtm); } |