TerryCavanagh / VVVVVV

The source code to VVVVVV! http://thelettervsixtim.es/
Other
7k stars 559 forks source link

Fix `setfont()` changing font of fading out text boxes #1000

Closed Daaaav closed 1 year ago

Daaaav commented 1 year ago

Changes:

Closes #925.

My fix here is to delay the font change until all fading-out textboxes have disappeared. See it as adding a sort of untilbars or untilfade for text box fadeout, into setfont.

Before:

https://github.com/TerryCavanagh/VVVVVV/assets/44736680/30ed2d7c-4292-41b5-af86-382ae2df0ec1

After:

https://github.com/TerryCavanagh/VVVVVV/assets/44736680/ca5ca402-899a-49cb-9292-4a2225d4ad9b

This doesn't prevent every possible way to change the font of an existing textbox, but you would need to use internal scripting to still do it (and basically be doing it on purpose) - the problem in simplified scripting when you simply do textbox-setfont-textbox is gone.

Also, #1000!

Legal Stuff:

By submitting this pull request, I confirm that...

InfoTeddy commented 1 year ago

As described, I consider the intended effect of this kludge acceptable and don't see a problem with still allowing people to intentionally change the font of an existing text box on purpose, merely just fixing it for simplified scripting, since it would otherwise force people to add the delay themselves.