Implement get_escape()
This commit is contained in:
parent
14b5989f26
commit
15ec1073b6
2 changed files with 6 additions and 0 deletions
|
@ -55,6 +55,8 @@ Converts an array into a string array.
|
||||||
If an item is found that is not of type `String`, an empty array is returned.
|
If an item is found that is not of type `String`, an empty array is returned.
|
||||||
### *Array* <u>stringarray_to_array</u>(*Array[String]* array)
|
### *Array* <u>stringarray_to_array</u>(*Array[String]* array)
|
||||||
Converts a string array into an array.
|
Converts a string array into an array.
|
||||||
|
### *String* <u>get_escape</u>()
|
||||||
|
Returns \ so you can (for example) print ANSI codes, which isn't normally possible because of GDScript restrictions.
|
||||||
### *Vector2* <u>get_center</u>(*Vector2* <u>parent_size</u>, *Vector2* <u>child_size</u>)
|
### *Vector2* <u>get_center</u>(*Vector2* <u>parent_size</u>, *Vector2* <u>child_size</u>)
|
||||||
Calculates the center of the child in the area of the parent.
|
Calculates the center of the child in the area of the parent.
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,10 @@ func stringarray_to_array(array: Array[String]) -> Array:
|
||||||
return output
|
return output
|
||||||
|
|
||||||
# +++ etc +++
|
# +++ etc +++
|
||||||
|
## Returns \ so you can (for example) print ANSI codes, which isn't normally possible because of GDScript restrictions.
|
||||||
|
func get_escape() -> String:
|
||||||
|
return PackedByteArray([0x1b]).get_string_from_ascii()
|
||||||
|
|
||||||
## Calculates the center of the child in the area of the parent.[br]
|
## Calculates the center of the child in the area of the parent.[br]
|
||||||
## [br]
|
## [br]
|
||||||
## Example:
|
## Example:
|
||||||
|
|
Loading…
Reference in a new issue