78 | | ==== border ==== |
79 | | * default: "false" |
80 | | * value: bool string "(true|false)" |
81 | | |
82 | | If set to {{{"true"}}}, the texture's area is surrounded by a border in {{{bordercolor}}}, starting at the edge of the image. As the object's {{{buffer_zone}}} increases, the border thickens inwards from the edge. |
83 | | |
84 | | If {{{"false"}}}, no border is displayed. |
85 | | |
86 | | ==== bordercolor ==== |
87 | | * default: "0 0 0 0" |
88 | | * value: color |
89 | | |
90 | | If {{{border}}} is {{{"true"}}}, this property indicates the RGB colour of the border (see GUIColor). |
91 | | |
92 | | Useless if border is not true. |
93 | | |
94 | | ==== cell_size ==== |
95 | | |
96 | | It's often more efficient to put multiple sprites of the same size in a grid, rather than storing each as a separate texture (for example, a series of unit portraits). Although we can reference different areas of a texture and store it in a sprite, each element in a sheet of icons would have to be assigned its own sprite, which would be highly repetitive. |
97 | | |
98 | | With this method, we can keep multiple identically-sized icons in one sprite, for example, and reference the individual cells. |
99 | | |
100 | | To activate this feature, just add {{{cell_size="<cell_width> <cell_height>"}}} (with appropriate numbers for the width and length of each cell) to the <image> attributes to tell the sprite parser the size of the individual cells: |
101 | | |
102 | | {{{ |
103 | | <sprite name="new_name"> |
104 | | <image texture="texture-from-texture-database" |
105 | | cell-size="64 64" |
106 | | size="0 0 100% 100%" |
107 | | texture_size="0 0 100% 100%" |
108 | | /> |
109 | | </sprite> |
110 | | }}} |
111 | | |
112 | | The GUI control {{{<object>}}}s have a corresponding {{{cell_id}}} attribute to specify which cell of the sprite they should display at the moment; {{{0}}} is the 1st element in the sprite. |
113 | | |
114 | | ==== delta_z ==== |
115 | | |
116 | | Replaced with {{{z_level}}}? Confirm. |
117 | | |