From 344ed9ec6ca8fd7ed78b5b2d309b52f570256ffa Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sat, 8 Oct 2022 11:33:50 +0800 Subject: Remove leading spaces from enumerator name hints For `PROPERTY_HINT_ENUM` properties, enumerator names can be provided as a comma separated list. There're a few properties that add leading spaces to the names (e.g. `First, Second, Third`). These spaces are included in the Inspector dropdown, which is unexpected. It's better to leave the surrounding spaces untouched because it could be part of the resulting string value (the variable is a string enum). And most other enum hints don't contain surrounding whitespaces. This PR removes the spaces and documents this `PROPERTY_HINT_ENUM` behavior. --- doc/classes/@GlobalScope.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/classes') diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 1b57569582..6e9e82bbf0 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2625,7 +2625,7 @@ Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string. - The hint string is a comma separated list of names such as [code]"Hello,Something,Else"[/code]. For integer and float properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending [code]:integer[/code] to the name, e.g. [code]"Zero,One,Three:3,Four,Six:6"[/code]. + The hint string is a comma separated list of names such as [code]"Hello,Something,Else"[/code]. Whitespaces are [b]not[/b] removed from either end of a name. For integer and float properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending [code]:integer[/code] to the name, e.g. [code]"Zero,One,Three:3,Four,Six:6"[/code]. Hints that a string property can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code]. -- cgit v1.2.3