From 1d7aa0ee18016ab0c0eef78b3d4859a21cac61c5 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Thu, 19 Sep 2024 22:25:22 -0700 Subject: [PATCH] Inline dialogue advance prompt --- src/k_dialogue.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/k_dialogue.cpp b/src/k_dialogue.cpp index c7c5beaa8..fc163498f 100644 --- a/src/k_dialogue.cpp +++ b/src/k_dialogue.cpp @@ -472,11 +472,35 @@ void Dialogue::Draw(void) .flags(V_VFLIP|V_FLIP) .patch(patchCache["TUTDIAGE"]); + std::string intertext = ""; + + if (Dismissable() && typewriter.text.length() > 0) + { + if (TextDone()) + { + drawer + .xy(-14, -7-5) + .patch(patchCache["TUTDIAG2"]); + } + + intertext += " "; + + if (Held()) + intertext += ""; + else if (TextDone()) + intertext += ""; + else + intertext += ""; + } + + std::string fulltext = typewriter.text + srb2::Draw::TextElement().parse(intertext).string(); + drawer .xy(10 - BASEVIDWIDTH, -3-32) .font(srb2::Draw::Font::kConsole) - .text( typewriter.text.c_str() ); + .text( fulltext.c_str() ); + /* if (Dismissable()) { if (TextDone()) @@ -495,7 +519,6 @@ void Dialogue::Draw(void) else ctrl += ""; - // FIXME: Old animation behavior (bt_translate_press above) std::string parsedctrl = srb2::Draw::TextElement().parse(ctrl).string(); drawer @@ -503,6 +526,7 @@ void Dialogue::Draw(void) .font(Draw::Font::kMenu) .text(parsedctrl); } + */ } void Dialogue::Dismiss(void)