GUI.Label can lag the (entering of) Game Menu

Started by Sebastian, Jun 17, 2022, 07:18 PM

Previous topic - Next topic

Sebastian

Note: Seems to happen when game is loaded in FULL SCREEN mode. (not windowed)



2am:


5am:
Here are my conclusions, after some more testing.

Vice City's Menu opening speed will start decreasing when there are >20 labels onscreen/hidden, with:
  • FontFlags (no matter which ones)
  • FontSize different than 11 (default)

Here is a code to test on:
function test() {
arr <- array(100);
for (local i = 0; i < arr.len(); i++) {
arr[i] = GUILabel( VectorScreen( 300, 300 ), Colour( 255,255,255 ), "FontSize changing + ESC to MENU speed!" );
arr[i].FontFlags = GUI_FFLAG_OUTLINE;
arr[i].FontSize = 11;
Console.Print( "created label no " + i );
}
}
test();

Test it. Works fine right? 100 labels.
Now change .FontSize value to anything else than 11, and try to enter the VC Menu.
Slow.
Now remove the .FontFlags, and enter the VC Menu again.
Fast, hm ? :p