mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Replace repeated LOGWARNING calls with ONCE(LOGWARNING) in
JSInterface_CGUISize.cpp and JSInterface_Main.cpp.
Why – The old behaviour printed a warning every time the deprecated
API was used, cluttering the log and annoying modders. We still want to
nudge them toward the new APIs (object.size = {...} and
guiObject.GetPreferedTextSize/getTextSize), but a single reminder is
enough.
What changed
CGUISimpleSetting<CGUISize>::DoFromJSVal now wraps the deprecation
message in ONCE(...).
Engine.GetTextSize warning is likewise wrapped.
Impact – Functionality is unchanged; only the frequency of the
warnings is throttled to one per session, making the transition less
intrusive and more user-friendly.
|
||
|---|---|---|
| .. | ||
| GuiScriptConversions.cpp | ||
| JSInterface_CGUISize.cpp | ||
| JSInterface_CGUISize.h | ||
| JSInterface_GUIManager.cpp | ||
| JSInterface_GUIManager.h | ||
| JSInterface_GUIProxy.cpp | ||
| JSInterface_GUIProxy.h | ||
| JSInterface_GUIProxy_impl.h | ||
| JSInterface_GUISize.cpp | ||
| JSInterface_GUISize.h | ||
| ScriptFunctions.cpp | ||
| ScriptFunctions.h | ||