UIImage Class
Definition
Namespace: Brine2D.UI
Image UI component for displaying textures.
Inheritance System.Object → UIImage
Implements IUIComponent, IAnchoredUIComponent
| Properties | |
|---|---|
| Alpha | Opacity \(0 = transparent, 1 = opaque\). |
| Anchor | The screen anchor point this component is positioned relative to. |
| AnchorOffset | Pixel offset from the resolved anchor point. |
| Animator | Optional sprite animator. When set, the current frame's source rect overrides SourceRect during rendering. |
| MaintainAspectRatio | Whether to maintain aspect ratio when scaling. |
| Rotation | Rotation in radians, applied around the center of the image. |
| SourceRect | Source rectangle in the texture (null = entire texture). |
| Texture | Texture to display. |
| Tint | Tint color combined with Alpha for the final modulation. |
| Methods | |
|---|---|
| SetTexture\(ITexture, bool\) | Sets the texture and optionally auto-sizes the component. |
| Events | |
|---|---|
| OnClick | Fired when the image is clicked. |