-
Notifications
You must be signed in to change notification settings - Fork 1
UI.UISprite
Matthew Daly edited this page Feb 12, 2023
·
7 revisions
Namespace: Verdant.UI
public class UISprite : UIElement
A UIElement that displays a sprite.
Navigate
Property | Description |
---|---|
Sprite | The RenderObject to draw. |
SpriteIndex | The index of the RenderObject to draw (only use if it is an Animation or SpriteSheet). |
public UISprite(RenderObject sprite, Vec2 position) : base(position, sprite.Width, sprite.Height)
Initialize a new UISprite.
Parameter | Description |
---|---|
RenderObject sprite
|
The sprite to draw. |
Vec2 position
|
The position of the sprite on the UI. |
public UISprite(RenderObject sprite, Vec2 position, int width, int height) : base(position, width, height)
Initialize a new UISprite.
Parameter | Description |
---|---|
RenderObject sprite
|
The sprite to draw. |
Vec2 position
|
The position of the sprite on the UI. |
int width
|
The width of the sprite. |
int height
|
The height of the sprite. |
public override void Draw(SpriteBatch spriteBatch)
Parameter | Description |
---|---|
SpriteBatch spriteBatch
|
The Verdant wiki is automatically generated from documentation comments in the codebase by markify.