imported>Chemicalcrux m Chemicalcrux moved page Image to Image (Component): Add Component suffix. |
Added a video. |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=ImageComponent.png | |Image=ImageComponent.png | ||
Line 9: | Line 8: | ||
<!--T:2--> | <!--T:2--> | ||
The '''Image''' component takes in a [[Component:SpriteProvider|SpriteProvider]] or [[Material]] and renders it onto the [[UIX]]. This can be used to display graphics and produce backgrounds. | |||
<!--T:3--> | <!--T:3--> | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Sprite|Sprite|The sprite to render | |Sprite|{{RootFieldType|AssetRef`1|[[Type:Sprite|Sprite]]}}|TypeAdv0=true|The sprite to render | ||
|Material|Material|The material to render with | |Material|{{RootFieldType|AssetRef`1|[[Type:Material|Material]]}}|TypeAdv1=true|The material to render with | ||
| | |PreserveAspect|Bool|Preserves the aspect ratio of this image provided. | ||
| | |NineSliceSizing|NineSliceSizing|Tells how the image gets 9-sliced on this UIX. | ||
| | |FlipHorizontally|Bool|Flips the image horizontally. | ||
|InteractionTarget|Bool| | |FlipVertically|Bool|Flips the image vertically. | ||
|__legacyZWrite|Bool|Internal | |InteractionTarget|Bool|Makes this image as the interaction target for this UIX. | ||
|FillRect|Rect|The filling rect for this image. | |||
|__legacyZWrite|Bool|Internal - The legacy Z writing for this image. | |||
|Tint|ColorX|A color that is multiplied with the material's color. | |||
}} | }} | ||
<!--T:4--> | <!--T:4--> | ||
== | == Usage == | ||
A user can use this to just display an image with an optional tint color, or have this as a background image for other images to be on top of. | |||
<!--T:5--> | <!--T:5--> | ||
== Examples == | == Examples == | ||
Here is [[User:ProbablePrime|ProbablePrime]]'s tutorial on images: | |||
<youtube>FUUSjTwhvHk</youtube> | |||
<!--T:6--> | <!--T:6--> | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Image | [[Category:Components{{#translation:}}|Image]] | ||
[[Category:ComponentStubs]] | [[Category:ComponentStubs]] | ||
[[Category:Components:UIX:Graphics{{#translation:}}|Image | [[Category:Components:UIX:Graphics{{#translation:}}|Image]] |
Revision as of 05:26, 22 July 2024
Component image
The Image component takes in a SpriteProvider or Material and renders it onto the UIX. This can be used to display graphics and produce backgrounds.
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
Sprite
|
Sprite | The sprite to render |
Material
|
Material | The material to render with |
PreserveAspect
|
Bool | Preserves the aspect ratio of this image provided. |
NineSliceSizing
|
NineSliceSizing | Tells how the image gets 9-sliced on this UIX. |
FlipHorizontally
|
Bool | Flips the image horizontally. |
FlipVertically
|
Bool | Flips the image vertically. |
InteractionTarget
|
Bool | Makes this image as the interaction target for this UIX. |
FillRect
|
Rect | The filling rect for this image. |
__legacyZWrite
|
Bool | Internal - The legacy Z writing for this image. |
Tint
|
ColorX | A color that is multiplied with the material's color. |
Usage
A user can use this to just display an image with an optional tint color, or have this as a background image for other images to be on top of.
Examples
Here is ProbablePrime's tutorial on images: