Types/IconSpecification: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Basics == Specifies the icon of an entity/item/technology/recipe etc. Either <code>icons</code> and optionally <code>icon_size</code>, or both <code>icon</code> and <code>...") |
No edit summary |
||
Line 1: | Line 1: | ||
== Basics == | == Basics == | ||
Specifies the icon of an entity/item/technology/recipe etc. | Specifies the icon of an entity/item/technology/recipe etc. The properties are specified directly in the prototype, not in another sub-property. | ||
Either <code>icons</code> and optionally <code>icon_size</code>, or both <code>icon</code> and <code>icon_size</code> have to be specified. | Either <code>icons</code> and optionally <code>icon_size</code>, or both <code>icon</code> and <code>icon_size</code> have to be specified. | ||
== | == Prototype properties: Option 1 == | ||
=== icons === | === icons === | ||
'''Type''': [[Types/table]] of [[Types/IconData]] | '''Type''': [[Types/table]] of [[Types/IconData]] | ||
Line 12: | Line 12: | ||
Mandatory if <code>icon_size</code> is not specified inside all instances of [[Types/IconData]] inside <code>icons</code>. The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon. | Mandatory if <code>icon_size</code> is not specified inside all instances of [[Types/IconData]] inside <code>icons</code>. The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon. | ||
== | == Prototype properties: Option 2 == | ||
=== icon === | === icon === | ||
'''Type''': [[Types/FileName]] | '''Type''': [[Types/FileName]] |
Revision as of 10:01, 19 May 2018
Basics
Specifies the icon of an entity/item/technology/recipe etc. The properties are specified directly in the prototype, not in another sub-property.
Either icons
and optionally icon_size
, or both icon
and icon_size
have to be specified.
Prototype properties: Option 1
icons
Type: Types/table of Types/IconData
icon_size
Type: Types/SpriteSizeType
Mandatory if icon_size
is not specified inside all instances of Types/IconData inside icons
. The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon.
Prototype properties: Option 2
icon
Type: Types/FileName
Path to the icon file.
icon_size
Type: Types/SpriteSizeType
Mandatory. The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon.