From dc7b347b0d77a8c74f302e48ea980ec8014df3dd Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 16 Dec 2004 00:38:41 +0000 Subject: Skinned checkbox similar to what it used to be. --- src/gui/mw_button.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/mw_button.cpp') 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); } -- cgit v1.2.3-70-g09d2