Types/IconData
Jump to navigation
Jump to search
Basics
Data of one icon "layer" for the icons
property of the Types/IconSpecification.
Mandatory properties
icon
Type: Types/FileName
The path to the icon.
icon_size
Type: Types/SpriteSizeType
Mandatory if icon_size
is not specified outside of icons
. The size of the square icon, in pixels, e.g. 32 for a 32px by 32px icon.
Optional properties
tint
Type: Types/Color
Default: {r=0, g=0, b=0, a=1}
Tint of the icon.
shift
Type: Types/vector
Default: {0, 0}
Used to offset the icon "layer" from the overall icon.
scale
Type: Types/double
Default: 1
Values different than 1 specify the scale of the icon on default gui scale. Scale 2 means that the icon will be 2 times bigger on screen (and more pixelated).
icon_mipmaps
Type: Types/uint8
Default: 0
Examples
{
icon = "__base__/graphics/icons/fluid/heavy-oil.png",
icon_size = 32,
scale = 0.5,
shift = {4, -8}
}