0ad/source
trompetin17 19e82ebceb
Add getPreferredTextSize to calculate unconstrained text width
Introduces (CButton|CText).getPreferredTextSize, a new method for estimating
the natural width of a caption if the object had no width constraints.

Unlike .getTextSize, which reports the size after applying current
layout constraints (e.g., fixed width or anchors), getPreferredTextSize
answers the question: "How wide would this object need to be to display
the caption on a single line?"

This is particularly useful for modders and layout logic that wants to
dynamically size elements *before* assigning a fixed width or anchoring.
2025-06-26 16:58:32 -05:00
..
collada Update headers in collada 2025-06-26 20:05:53 +02:00
graphics Remove UNUSED 2025-06-26 17:25:05 +02:00
gui Add getPreferredTextSize to calculate unconstrained text width 2025-06-26 16:58:32 -05:00
i18n Get config values without using return parameters 2025-04-09 12:51:21 +02:00
lib Remove UNUSED 2025-06-26 17:25:05 +02:00
lobby Remove UNUSED 2025-06-26 17:25:05 +02:00
maths Remove UNUSED 2025-06-26 17:25:05 +02:00
mocks Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
network Remove UNUSED 2025-06-26 17:25:05 +02:00
pch Remove glooxwrapper 2024-11-25 20:01:00 +01:00
ps Remove UNUSED 2025-06-26 17:25:05 +02:00
renderer Remove UNUSED 2025-06-26 17:25:05 +02:00
rlinterface Shutdown mongoose in rl-interface gracefully 2024-06-23 17:26:03 +00:00
scriptinterface Remove UNUSED 2025-06-26 17:25:05 +02:00
simulation2 Remove UNUSED 2025-06-26 17:25:05 +02:00
soundmanager Remove UNUSED 2025-06-26 17:25:05 +02:00
third_party Remove UNUSED 2025-06-26 17:25:05 +02:00
tools Remove UNUSED 2025-06-26 17:25:05 +02:00
main.cpp Adds fixed frame frequency. 2025-04-25 19:15:57 +02:00
test_setup.cpp Don't use ".." to get the data-directory 2025-06-18 14:42:13 +02:00