Types/ElementImageSetLayer: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Removed old prototype docs)
Tag: Replaced
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:ElementImageSetLayer properties.png|frame|How the sprites are laid out graphically when using a composition type element image set layer.]][[File:ElementImageSetLayer stretching.png|frame|How the sprites are stretched when using a composition type element image set layer.]]
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/ElementImageSetLayer.html https://lua-api.factorio.com/latest/types/ElementImageSetLayer.html]


== Optional properties ==
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
=== draw_type ===
'''Type''': [[Types/string|string]]
 
'''Default''': "inner"
 
Either "inner" or "outer". Defines whether the border should be drawn inside the widget (the default) which affects the padding and content size of the widget, or outside of the widget which doesn't affect size. The outer draw type is most commonly used for shadows, glows and insets.
 
=== type ===
'''Type''': [[Types/string|string]]
 
'''Default''': "none" if this has no other properties, otherwise "composition"
 
Either "composition" or "none".
 
=== tint ===
'''Type''': [[Types/Color|Color]]
 
'''Default''': <nowiki>White ({1,1,1,1})</nowiki>
 
Only loaded if <code>type</code> is "composition".
 
=== center ===
'''Type''': [[Types/Sprite|Sprite]]
 
If none of "center", "left", "left_top", "left_bottom", "right", "right_top", "right_bottom", "top" or "bottom" exist, the entire ElementImageSetLayer is loaded as a [[Types/Sprite|Sprite]] which then gets used as "center".
 
Only loaded if <code>type</code> is "composition".
 
=== left ===
'''Type''': [[Types/Sprite|Sprite]]
 
Only loaded if <code>type</code> is "composition".
 
=== left_top ===
'''Type''': [[Types/Sprite|Sprite]]
 
Only loaded if <code>type</code> is "composition".
 
=== left_bottom ===
'''Type''': [[Types/Sprite|Sprite]]
 
Only loaded if <code>type</code> is "composition".
 
=== right ===
'''Type''': [[Types/Sprite|Sprite]]
 
Only loaded if <code>type</code> is "composition".
 
=== right_top ===
'''Type''': [[Types/Sprite|Sprite]]
 
Only loaded if <code>type</code> is "composition".
 
=== right_bottom ===
'''Type''': [[Types/Sprite|Sprite]]
 
Only loaded if <code>type</code> is "composition".
 
=== top ===
'''Type''': [[Types/Sprite|Sprite]]
 
Only loaded if <code>type</code> is "composition".
 
=== bottom ===
'''Type''': [[Types/Sprite|Sprite]]
 
Only loaded if <code>type</code> is "composition".
 
=== corner_size ===
[[File:ElementImageSetLayer base_sizes.png|200px|thumb|In base game, the corner size is 8 and the sides are 1px long and 8px wide.]]
'''Type''': [[Types/uint16|uint16]] or [[Types/table|table]] of [[Types/uint16|uint16]]
 
If this is an array, the first member of the array is width and the second is height. Otherwise the size is both width and  height.
 
Example of how an [[Types/ElementImageSet]] is loaded which has only one layer and the layer uses corner size as shown in the image on the right:
<syntaxhighlight lang="lua">{
  base = {position = {0, 17}, corner_size = 8},
},</syntaxhighlight>
 
Only loaded if <code>type</code> is "composition".
{{clear}}
=== filename ===
'''Type''': [[Types/FileName|FileName]]
 
Defaults to the <code>default_tileset</code> set in [[Prototype/GuiStyle]].
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== position ===
'''Type''': [[Types/Position|Position]]
 
Mandatory if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== load_in_minimal_mode ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': true
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== top_width ===
'''Type''': [[Types/SpriteSizeType|SpriteSizeType]]
 
'''Default''': 1
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== bottom_width ===
'''Type''': [[Types/SpriteSizeType|SpriteSizeType]]
 
'''Default''': 1
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== left_height ===
'''Type''': [[Types/SpriteSizeType|SpriteSizeType]]
 
'''Default''': 1
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== right_height ===
'''Type''': [[Types/SpriteSizeType|SpriteSizeType]]
 
'''Default''': 1
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== center_width ===
'''Type''': [[Types/SpriteSizeType|SpriteSizeType]]
 
'''Default''': 1
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== center_height ===
'''Type''': [[Types/SpriteSizeType|SpriteSizeType]]
 
'''Default''': 1
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== scale ===
'''Type''': [[Types/double|double]]
 
'''Default''': 1
 
Only loaded if <code>corner_size</code> exists. Only loaded if <code>type</code> is "composition".
 
=== top_border ===
'''Type''': [[Types/int32|int32]]
 
Only loaded if <code>type</code> is "composition".
 
=== right_border ===
'''Type''': [[Types/int32|int32]]
 
Only loaded if <code>type</code> is "composition".
 
=== bottom_border ===
'''Type''': [[Types/int32|int32]]
 
Only loaded if <code>type</code> is "composition".
 
=== left_border ===
'''Type''': [[Types/int32|int32]]
 
Only loaded if <code>type</code> is "composition".
 
=== border ===
'''Type''': [[Types/int32|int32]]
 
Sets <code>top_border</code>, <code>right_border</code>, <code>bottom_border</code> and <code>left_border</code>.
 
Only loaded if <code>corner_size</code> doesn't exists. Only loaded if <code>type</code> is "composition".
 
=== stretch_monolith_image_to_size ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': true
 
Only loaded if <code>type</code> is "composition".
 
=== left_tiling ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': false
 
Tiling is used to make a side (not corner) texture repeat instead of being stretched.
 
=== right_tiling ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': false
 
=== top_tiling ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': false
 
=== bottom_tiling ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': false
 
=== center_tiling_vertical ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': false
 
=== center_tiling_horizontal ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': false
 
=== overall_tiling_horizontal_size ===
'''Type''': [[Types/uint16|uint16]]
 
'''Default''': 0
 
Overall tiling is used to make the overall texture repeat instead of being stretched.
 
=== overall_tiling_horizontal_spacing ===
'''Type''': [[Types/uint16|uint16]]
 
'''Default''': 0
 
=== overall_tiling_horizontal_padding ===
'''Type''': [[Types/uint16|uint16]]
 
'''Default''': 0
 
=== overall_tiling_vertical_size ===
'''Type''': [[Types/uint16|uint16]]
 
'''Default''': 0
 
=== overall_tiling_vertical_spacing ===
'''Type''': [[Types/uint16|uint16]]
 
'''Default''': 0
 
=== overall_tiling_vertical_padding ===
'''Type''': [[Types/uint16|uint16]]
 
'''Default''': 0
 
=== custom_horizontal_tiling_sizes ===
'''Type''': [[Types/table|table]] of [[Types/uint32|uint32]]
 
=== opacity ===
'''Type''': [[Types/double|double]]
 
'''Default''': 1
 
=== background_blur ===
'''Type''': [[Types/bool|bool]]
 
'''Default''': false
 
=== background_blur_sigma ===
'''Type''': [[Types/float|float]]
 
'''Default''': 4 if <code>background_blur</code> is true
 
=== top_outer_border_shift ===
'''Type''': [[Types/int32|int32]]
 
'''Default''': 0
 
=== bottom_outer_border_shift ===
'''Type''': [[Types/int32|int32]]
 
'''Default''': 0
 
=== right_outer_border_shift ===
'''Type''': [[Types/int32|int32]]
 
'''Default''': 0
 
=== left_outer_border_shift ===
'''Type''': [[Types/int32|int32]]
 
'''Default''': 0

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/ElementImageSetLayer.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.