Add a property hint for DynamicFont size

This caps its size to reasonable values in the Inspector.

This closes #22581.
This commit is contained in:
Hugo Locurcio 2019-05-02 00:45:34 +02:00
parent 46b6fb83ef
commit 818f756d90
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 1 additions and 1 deletions

View File

@ -1008,7 +1008,7 @@ void DynamicFont::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_fallback_count"), &DynamicFont::get_fallback_count); ClassDB::bind_method(D_METHOD("get_fallback_count"), &DynamicFont::get_fallback_count);
ADD_GROUP("Settings", ""); ADD_GROUP("Settings", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "size", PROPERTY_HINT_RANGE, "1,255,1"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "outline_size", PROPERTY_HINT_RANGE, "0,255,1"), "set_outline_size", "get_outline_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "outline_size", PROPERTY_HINT_RANGE, "0,255,1"), "set_outline_size", "get_outline_size");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "outline_color"), "set_outline_color", "get_outline_color"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "outline_color"), "set_outline_color", "get_outline_color");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_mipmaps"), "set_use_mipmaps", "get_use_mipmaps"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_mipmaps"), "set_use_mipmaps", "get_use_mipmaps");