跳转至

UI Texture File

文档版本:1.21.0.24

The file that specifies either 9slice texture or Aseprite flipbook.

架构

nine_slice:
{
  number "nineslice_size" : opt
  array "nineslice_size" : opt
  {
    number "<any array element>" : opt
  }
  array "base_size" : opt
  {
    number "<any array element>" : opt
  }
}
nineslice_sizenumber
Offset from left, top, right and bottom of the texture file.
nineslice_sizearray
Offsets from left, top, right and bottom of the texture file (in this exact order).
nineslice_size
<any array element>number
base_sizearray
Width and height of the texture (in this exact order).
base_size
<any array element>number
aseprite_flipbook:
{
  object "meta" : opt
  {
    object "size" : opt
    {
      integer "w" : opt
      integer "h" : opt
    }
    string "image" : opt
  }
  array "frames" : opt
  {
    object "<any array element>" : opt
    {
      integer "duration" : opt
      object "frame" : opt
      {
        integer "x" : opt
        integer "y" : opt
      }
    }
  }
}
metaobject
The meta data of the flipbook.
meta
sizeobject
The size of the flipbook sprite sheet.
size
winteger
The width of the sprite sheet.
hinteger
The height of the sprite sheet.
imagestring
The path to the sprite sheet. The value is required, but not used.
framesarray
The frames of the flipbook.
frames
<any array element>object
A frame of the flipbook.
<any array element>
durationinteger
The duration of the frame in milliseconds.
frameobject
The position of the frame in the sprite sheet (UV).
frame
xinteger
The x position of the frame in the sprite sheet.
yinteger
The y position of the frame in the sprite sheet.