Add textoutline(on/off/default)

This commit adds a new scripting command for textbox visual control,
where you're able to force the transparent textbox's outline on or off.
This commit is contained in:
NyakoFox
2024-11-03 16:07:55 -04:00
committed by Misa Elizabeth Kai
parent 45e60fa69c
commit 98a0931225
6 changed files with 60 additions and 7 deletions

View File

@@ -568,6 +568,8 @@ void scriptclass::run(void)
textbox_sprites.clear();
textbox_image = TEXTIMAGE_NONE;
textbox_forcepos = false;
textbox_force_outline = false;
textbox_outline = false;
}
else if (words[0] == "position")
{
@@ -746,6 +748,23 @@ void scriptclass::run(void)
textbox_image = TEXTIMAGE_NONE;
}
}
else if (words[0] == "textoutline")
{
if (words[1] == "default")
{
textbox_force_outline = false;
}
else if (words[1] == "on")
{
textbox_force_outline = true;
textbox_outline = true;
}
else if (words[1] == "off")
{
textbox_force_outline = true;
textbox_outline = false;
}
}
else if (words[0] == "flipme")
{
textflipme = !textflipme;
@@ -803,6 +822,11 @@ void scriptclass::run(void)
}
}
if (textbox_force_outline)
{
graphics.textboxoutline(textbox_outline);
}
TextboxOriginalContext context = TextboxOriginalContext();
context.text_case = textcase;
context.lines = std::vector<std::string>(txt);