IconData :: struct Example code
| icon | :: FileName | Path to the icon file. |
Path to the icon file. | ||
| icon_size optional | :: SpriteSizeType | The size of the square icon, in pixels. [...] |
The size of the square icon, in pixels. [...] | ||
| tint optional | :: Color | The tint to apply to the icon. |
The tint to apply to the icon. | ||
| shift optional | :: Vector | Used to offset the icon "layer" from the overall icon. [...] |
Used to offset the icon "layer" from the overall icon. [...] | ||
| scale optional | :: double | Defaults to |
Defaults to | ||
| draw_background optional | :: boolean | Outline is drawn using signed distance field generated on load. [...] |
Outline is drawn using signed distance field generated on load. [...] | ||
| floating optional | :: boolean | When |
When | ||
Properties
icon :: FileName
icon_size :: SpriteSizeType optional 
tint :: Color optional 
shift :: Vector optional 
scale :: double optional 
draw_background :: boolean optional 
floating :: boolean optional 
Examples 
-- one icon layer
{
icon = "__base__/graphics/icons/fluid/heavy-oil.png",
icon_size = 64,
scale = 0.5,
shift = {4, -8}
}
-- Layered icon, with size defined per layer
icons =
{
{
icon = "__base__/graphics/icons/fluid/barreling/barrel-empty.png",
icon_size = 32
},
{
icon = "__base__/graphics/icons/fluid/barreling/barrel-empty-side-mask.png",
icon_size = 32,
tint = { a = 0.75, b = 0, g = 0, r = 0 }
},
{
icon = "__base__/graphics/icons/fluid/barreling/barrel-empty-top-mask.png",
icon_size = 32,
tint = { a = 0.75, b = 0.5, g = 0.5, r = 0.5 }
},
{
icon = "__base__/graphics/icons/fluid/crude-oil.png",
icon_size = 32,
scale = 0.5,
shift = {7, 8}
}
}
Type used in
- AchievementPrototype::icons
- AmmoCategory::icons
- AsteroidChunkPrototype::icons
- BaseModifier::icons
- EntityPrototype::icons
- FluidPrototype::icons
- ItemGroup::icons
- ItemPrototype::icons
- ItemPrototype::dark_background_icons
- ItemWithEntityDataPrototype::icon_tintable_masks
- ItemWithEntityDataPrototype::icon_tintables
- QualityPrototype::icons
- RecipePrototype::icons
- ScriptedTechnologyTrigger::icons
- ShortcutPrototype::icons
- ShortcutPrototype::small_icons
- SpaceConnectionPrototype::icons
- SpaceLocationPrototype::icons
- SpaceLocationPrototype::starmap_icons
- SurfacePrototype::icons
- TechnologyPrototype::icons
- TilePrototype::icons
- TipsAndTricksItem::icons
- VirtualSignalPrototype::icons

