0ad/source/ps/scripting
trompetin17 e845da025a
Add deprecation warning to GetTextSize API
Adds a runtime warning to `Engine.GetTextSize` indicating that the API
is deprecated and will be removed in a future version.

This API does not simulate GUI rendering accurately, as it treats markup
tags like [color], [font], or [icon] as visible characters. This leads
to incorrect size measurements in modern GUI layouts.

New recommended alternatives:
- Use `Engine.GetGUITextSize(...)` for accurate measurement of raw text
  blocks, fully simulating GUI rendering.
- Use `guiObject.getTextSize()` when working within a specific GUI
  object, as it accounts for maxWidth, padding (bufferZone), and object
  constraints.

A warning is now emitted at runtime to guide developers toward these
updated APIs.
2025-06-26 17:11:24 -05:00
..
JSInterface_ConfigDB.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_ConfigDB.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_Console.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_Console.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_Debug.cpp Export a 10-char commit hash in the build version 2025-01-07 13:51:45 +01:00
JSInterface_Debug.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_Game.cpp Fix change perspective in replays 2025-06-03 13:52:26 +02:00
JSInterface_Game.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_Hotkey.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_Hotkey.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_Main.cpp Add deprecation warning to GetTextSize API 2025-06-26 17:11:24 -05:00
JSInterface_Main.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_Mod.cpp Refactor freezing of JS objects 2024-12-05 17:49:16 +01:00
JSInterface_Mod.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_ModIo.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_ModIo.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_SavedGame.cpp Multiplayer saved games 2024-12-19 21:36:51 +01:00
JSInterface_SavedGame.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_UserReport.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_UserReport.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_VFS.cpp Remove the name of some unused arguments 2025-06-18 12:49:59 +02:00
JSInterface_VFS.h Fix missing includes when building without precompiled headers 2023-12-04 20:23:37 +00:00
JSInterface_VisualReplay.cpp Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_VisualReplay.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00