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

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 1,187
GUI.Label can lag the (entering of) Game Menu
«  »
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:
Code: [Select]
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