mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Store original position of text box
This stores the original x-position and y-position of the text box, and when a text box gets repositioned, it will use those unless a crewmate position overrides it. This is the original position of the text box, before centering or crewmate position is considered. This fixes a bug where a cutscene text box can be "shifted" from its normal position via CTRL+F8 cycling if there is a translation that is too long for the screen and thus gets pushed by adjust(). I tested this with the text box in the Comms Relay cutscene that starts with "If YOU can find a teleporter". This is not applicable to function-based translations (TEXTTRANSLATE_FUNCTION), because the responsibility of correctly positioning the text box resides with the function.
This commit is contained in:
@@ -773,6 +773,8 @@ void scriptclass::run(void)
|
||||
context.text_case = textcase;
|
||||
context.lines = std::vector<std::string>(txt);
|
||||
context.script_name = scriptname;
|
||||
context.x = textx;
|
||||
context.y = texty;
|
||||
|
||||
graphics.textboxcrewmateposition(&textcrewmateposition);
|
||||
graphics.textboxoriginalcontext(&context);
|
||||
|
||||
Reference in New Issue
Block a user