Add position(force)

This argument forces the textbox position, meaning it won't be moved
to be inside of the bounds of the screen (nor have the 10 pixel padding
on each side.)
This commit is contained in:
NyakoFox authored and Misa Elizabeth Kai committed 2024-11-07 09:53:45 -08:00
1 parent d8a8e44afa
commit 45e60fa69c
6 files changed
+58 -18

No files matched your search

+16 -11
View File
@@ -29,6 +29,8 @@ textboxclass::textboxclass(int gap)
large = false;
position_forced = false;
should_centerx = false;
should_centery = false;
@@ -78,18 +80,21 @@ void textboxclass::centery(void)
void textboxclass::applyposition(void)
{
resize();
reposition();
if (should_centerx)
if (!position_forced)
{
centerx();
}
if (should_centery)
{
centery();
}
if (translate == TEXTTRANSLATE_CUTSCENE)
{
adjust();
reposition();
if (should_centerx)
{
centerx();
}
if (should_centery)
{
centery();
}
if (translate == TEXTTRANSLATE_CUTSCENE)
{
adjust();
}
}
}