diff --git a/src/k_dialogue.cpp b/src/k_dialogue.cpp index 74abfa72e..c7c5beaa8 100644 --- a/src/k_dialogue.cpp +++ b/src/k_dialogue.cpp @@ -486,18 +486,22 @@ void Dialogue::Draw(void) .patch(patchCache["TUTDIAG2"]); } - auto bt_translate_press = [this]() -> std::optional - { - if (Held()) - return true; - if (TextDone()) - return {}; - return false; - }; + std::string ctrl = ""; + + if (Held()) + ctrl += ""; + else if (TextDone()) + ctrl += ""; + else + ctrl += ""; + + // FIXME: Old animation behavior (bt_translate_press above) + std::string parsedctrl = srb2::Draw::TextElement().parse(ctrl).string(); drawer .xy(17-14 - BASEVIDWIDTH, -39-16) - .button(srb2::Draw::Button::z, bt_translate_press()); + .font(Draw::Font::kMenu) + .text(parsedctrl); } } diff --git a/src/k_hud.cpp b/src/k_hud.cpp index ab8bfb577..8f8eae434 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -6496,7 +6496,7 @@ void K_drawKartHUD(void) #if 1 using srb2::Draw; - if (1) + if (0) { // Draw::TextElement text = Draw::TextElement().parse("A B C X Y Z \nST L R U D L R "); Draw::TextElement text = Draw::TextElement().parse("Unpressed Pressed Animated "); diff --git a/src/v_video.cpp b/src/v_video.cpp index 1ba86ecae..63005c92b 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -2862,11 +2862,16 @@ void V_DrawStringScaled( }; cw = V_GetButtonCodeWidth(c) * dupx; + + // FIXME do real widths + if (largebutton) + cw += 3*dupx; + cxoff = (*fontspec.dim_fn)(scale, fontspec.chw, hchw, dupx, &cw); Draw bt = Draw( FixedToFloat(cx + cxoff) - (bt_inst->x * dupx), - FixedToFloat(cy + cyoff) - ((bt_inst->y + fontspec.button_yofs) * dupy)) + FixedToFloat(cy + cyoff) - ((bt_inst->y + fontspec.button_yofs) * dupy) - (largebutton ? 2*dupy : 0)) .flags(flags); if (largebutton) @@ -2924,11 +2929,16 @@ void V_DrawStringScaled( }; cw = V_GetGenericButtonCodeWidth(c) * dupx; + + // FIXME do real widths + if (largebutton) + cw += 3*dupx; + cxoff = (*fontspec.dim_fn)(scale, fontspec.chw, hchw, dupx, &cw); Draw bt = Draw( FixedToFloat(cx + cxoff) - (bt_inst->x * dupx), - FixedToFloat(cy + cyoff) - ((bt_inst->y + fontspec.button_yofs) * dupy)) + FixedToFloat(cy + cyoff) - ((bt_inst->y + fontspec.button_yofs) * dupy) - (largebutton ? 2*dupy : 0)) .flags(flags); if (largebutton)