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.
This commit is contained in:
parent
18177828ad
commit
344ed9ec6c
8 changed files with 8 additions and 8 deletions
|
|
@ -230,7 +230,7 @@ void SkeletonModification2D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_editor_draw_gizmo"), &SkeletonModification2D::get_editor_draw_gizmo);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "get_enabled");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "execution_mode", PROPERTY_HINT_ENUM, "process, physics_process"), "set_execution_mode", "get_execution_mode");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "execution_mode", PROPERTY_HINT_ENUM, "process,physics_process"), "set_execution_mode", "get_execution_mode");
|
||||
}
|
||||
|
||||
SkeletonModification2D::SkeletonModification2D() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue