Class Image
- Namespace
- UILib.Components
- Assembly
- UILib.dll
A component which just displays an image.
public class Image : UIComponent
- Inheritance
-
Image
- Inherited Members
Constructors
Image()
Initializes an image.
public Image()
Image(Color)
Initializes an image with the specified color.
public Image(Color color)
Parameters
colorColorThe color to set on the image
Image(Texture2D)
Initializes an image with the specified texture.
public Image(Texture2D texture)
Parameters
textureTexture2DThe texture to display
Properties
image
public Image image { get; }
Property Value
- Image
Methods
SetColor(Color)
Changes the color of this image.
public void SetColor(Color color)
Parameters
colorColorThe color to use
SetTexture(Texture2D)
Changes this image to use a different texture.
public void SetTexture(Texture2D texture)
Parameters
textureTexture2DThe texture to apply
SetThisTheme(Theme)
Allows setting the theme of this image. Does nothing.
This handles setting the theme specifically for this component, not its children. It's protected to allow overriding if you were to create a subclass.
In most cases, you'd probably want to use SetTheme(Theme) instead.
protected override void SetThisTheme(Theme theme)
Parameters
themeThemeThe theme to apply