X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fgui%2Fdialog.cpp;h=47b9a0c1f8e3ec8d28c531a540b63f96a884dab8;hb=b699d5a6303e164aab04f1a1d0990b978c15d87d;hp=e536c9cd32ce168444449bfe8f049e8afee5e534;hpb=8eff855963e2699763d0d653dabc9b709f0d2ab0;p=supertux.git diff --git a/src/gui/dialog.cpp b/src/gui/dialog.cpp index e536c9cd3..47b9a0c1f 100644 --- a/src/gui/dialog.cpp +++ b/src/gui/dialog.cpp @@ -209,12 +209,12 @@ Dialog::draw(DrawingContext& ctx) { float segment_width = bg_rect.get_width() / m_buttons.size(); float button_width = segment_width; - float button_height = 24.0f; Vector pos(bg_rect.p1.x + segment_width/2.0f + i * segment_width, bg_rect.p2.y - 12); if (i == m_selected_button) { + float button_height = 24.0f; float blink = (sinf(real_time * M_PI * 1.0f)/2.0f + 0.5f) * 0.5f + 0.25f; ctx.draw_filled_rect(Rectf(Vector(pos.x - button_width/2, pos.y - button_height/2), Vector(pos.x + button_width/2, pos.y + button_height/2)).grown(2.0f),