Constructor
new UIUtils()
Member
(static) escapeSequence :Object
Methods
addFilter(target, filter)
Adds a filter to the display object for the specified target.
Parameters:
Name | Type | Description |
---|---|---|
target |
Sprite
|
Target display object. |
filter |
IFilter
|
Filter object. |
adptString(str) → {String}
Replacing escape characters in strings
Parameters:
Name | Type | Description |
---|---|---|
str |
String
|
Returns:
- Type:
-
String
clearFilter(target, filterType)
Removes the specified type filter for the target display object.
Parameters:
Name | Type | Description |
---|---|---|
target |
Sprite
|
Target display object. |
filterType |
Class
|
Filter type. |
fillArray(arr, str, typeopt) → {Array}
Fills an array with string and returns a copy of the array.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
arr |
Array
|
Source array object. | ||
str |
String
|
A string that is joined by commas. Such as "P1", "P2", "P3", "P4"". | ||
type |
Class
|
<optional> |
null | type If the value is not null, the new value type is filled. |
Returns:
- Type:
-
Array
Packed array.
gray(traget, isGray)
Displays objects for the specified target, adds or removes grayscale filters.
Parameters:
Name | Type | Description |
---|---|---|
traget |
Sprite
|
Target display object. |
isGray |
Boolean
|
If the value is true, add a grayscale filter, or remove the grayscale filter. |
toColor(color) → {String}
Converts the uint type color value to a character color value.
Parameters:
Name | Type | Description |
---|---|---|
color |
uint
|
Uint color values. |
Returns:
- Type:
-
String
Character color value.