diff --git a/core/core_constants.cpp b/core/core_constants.cpp index 2f5fd05e6ac..63e7323f7a3 100644 --- a/core/core_constants.cpp +++ b/core/core_constants.cpp @@ -165,6 +165,9 @@ void register_global_constants() { BIND_CORE_ENUM_CONSTANT(INLINE_ALIGNMENT_CENTER); BIND_CORE_ENUM_CONSTANT(INLINE_ALIGNMENT_BOTTOM); + BIND_CORE_ENUM_CONSTANT(INLINE_ALIGNMENT_IMAGE_MASK); + BIND_CORE_ENUM_CONSTANT(INLINE_ALIGNMENT_TEXT_MASK); + BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, SPECIAL); BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, ESCAPE); BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, TAB); diff --git a/core/string/translation.cpp b/core/string/translation.cpp index 7cc41df9efd..eeac8b0acf6 100644 --- a/core/string/translation.cpp +++ b/core/string/translation.cpp @@ -925,6 +925,7 @@ bool TranslationServer::is_placeholder(String &p_message, int p_index) const { void TranslationServer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_locale", "locale"), &TranslationServer::set_locale); ClassDB::bind_method(D_METHOD("get_locale"), &TranslationServer::get_locale); + ClassDB::bind_method(D_METHOD("get_tool_locale"), &TranslationServer::get_tool_locale); ClassDB::bind_method(D_METHOD("compare_locales", "locale_a", "locale_b"), &TranslationServer::compare_locales); ClassDB::bind_method(D_METHOD("standardize_locale", "locale"), &TranslationServer::standardize_locale); diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 750f23902d7..a5e89eec805 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1371,6 +1371,8 @@ static void _register_variant_builtin_methods() { bind_method(String, length, sarray(), varray()); bind_method(String, substr, sarray("from", "len"), varray(-1)); bind_method(String, get_slice, sarray("delimiter", "slice"), varray()); + bind_method(String, get_slicec, sarray("delimiter", "slice"), varray()); + bind_method(String, get_slice_count, sarray("delimiter"), varray()); bind_methodv(String, find, static_cast(&String::find), sarray("what", "from"), varray(0)); bind_method(String, count, sarray("what", "from", "to"), varray(0, 0)); bind_method(String, countn, sarray("what", "from", "to"), varray(0, 0)); @@ -1667,6 +1669,7 @@ static void _register_variant_builtin_methods() { /* RID */ + bind_method(RID, is_valid, sarray(), varray()); bind_method(RID, get_id, sarray(), varray()); /* NodePath */ diff --git a/core/variant/variant_op.cpp b/core/variant/variant_op.cpp index f35774204bc..cd1ae9f41ff 100644 --- a/core/variant/variant_op.cpp +++ b/core/variant/variant_op.cpp @@ -176,6 +176,7 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_ADD, Variant::FLOAT, Variant::INT); register_op>(Variant::OP_ADD, Variant::FLOAT, Variant::FLOAT); register_op>(Variant::OP_ADD, Variant::STRING, Variant::STRING); + register_op>(Variant::OP_ADD, Variant::INT, Variant::STRING); register_op>(Variant::OP_ADD, Variant::VECTOR2, Variant::VECTOR2); register_op>(Variant::OP_ADD, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_ADD, Variant::VECTOR3, Variant::VECTOR3); @@ -622,6 +623,7 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_LESS, Variant::FLOAT, Variant::INT); register_op>(Variant::OP_LESS, Variant::FLOAT, Variant::FLOAT); register_op>(Variant::OP_LESS, Variant::STRING, Variant::STRING); + register_op>(Variant::OP_LESS, Variant::STRING_NAME, Variant::STRING_NAME); register_op>(Variant::OP_LESS, Variant::VECTOR2, Variant::VECTOR2); register_op>(Variant::OP_LESS, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_LESS, Variant::VECTOR3, Variant::VECTOR3); @@ -634,6 +636,7 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_LESS_EQUAL, Variant::FLOAT, Variant::INT); register_op>(Variant::OP_LESS_EQUAL, Variant::FLOAT, Variant::FLOAT); register_op>(Variant::OP_LESS_EQUAL, Variant::STRING, Variant::STRING); + register_op>(Variant::OP_LESS_EQUAL, Variant::STRING_NAME, Variant::STRING_NAME); register_op>(Variant::OP_LESS_EQUAL, Variant::VECTOR2, Variant::VECTOR2); register_op>(Variant::OP_LESS_EQUAL, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_LESS_EQUAL, Variant::VECTOR3, Variant::VECTOR3); @@ -647,6 +650,7 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_GREATER, Variant::FLOAT, Variant::INT); register_op>(Variant::OP_GREATER, Variant::FLOAT, Variant::FLOAT); register_op>(Variant::OP_GREATER, Variant::STRING, Variant::STRING); + register_op>(Variant::OP_GREATER, Variant::STRING_NAME, Variant::STRING_NAME); register_op>(Variant::OP_GREATER, Variant::VECTOR2, Variant::VECTOR2); register_op>(Variant::OP_GREATER, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_GREATER, Variant::VECTOR3, Variant::VECTOR3); @@ -659,6 +663,7 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_GREATER_EQUAL, Variant::FLOAT, Variant::INT); register_op>(Variant::OP_GREATER_EQUAL, Variant::FLOAT, Variant::FLOAT); register_op>(Variant::OP_GREATER_EQUAL, Variant::STRING, Variant::STRING); + register_op>(Variant::OP_GREATER_EQUAL, Variant::STRING_NAME, Variant::STRING_NAME); register_op>(Variant::OP_GREATER_EQUAL, Variant::VECTOR2, Variant::VECTOR2); register_op>(Variant::OP_GREATER_EQUAL, Variant::VECTOR2I, Variant::VECTOR2I); register_op>(Variant::OP_GREATER_EQUAL, Variant::VECTOR3, Variant::VECTOR3); diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index d8c9ca08e87..4c0f89f14d3 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1267,6 +1267,12 @@ Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code]. + + A bit mask for [code]INLINE_ALIGNMENT_*_TO[/code] alignment constants. + + + A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants. + Keycodes with this bit applied are non-printable. diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 695b0933fa7..990e82593ec 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -30,6 +30,12 @@ Returns the ID of the referenced resource. + + + + Returns [code]true[/code] if [RID] is valid. + + diff --git a/doc/classes/String.xml b/doc/classes/String.xml index eeb17c24c05..a6182f5daba 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -222,6 +222,22 @@ [/codeblock] + + + + + Splits a string using a [code]delimiter[/code] and returns a number of slices. + + + + + + + + Splits a string using a Unicode character with code [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist. + This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index. + + diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index b32665a09f1..85c4d7593e1 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -48,6 +48,18 @@ + + + + + + + + + + + + @@ -65,5 +77,17 @@ + + + + + + + + + + + + diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index c90cb2987c1..6ece42da6b2 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -91,6 +91,13 @@ Returns readable script name for the [code]script[/code] code. + + + + Returns the current locale of the editor. + [b]Note:[/b] When called from an exported project returns the same value as [method get_locale]. + + diff --git a/doc/classes/int.xml b/doc/classes/int.xml index d212fe42bfa..006dc7eb29c 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -176,6 +176,13 @@ Multiplies two [int]s. + + + + + Adds Unicode character with code [int] to the [String]. + +