diff options
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); } |