Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

VRage.Game.GUI.TextPanel.MySprite

Morten Aune Lyrstad edited this page Apr 16, 2022 · 21 revisions

IndexNamespace Index

MySprite Struct

public struct MySprite: IEquatable<MySprite>

Namespace: VRage.Game.GUI.TextPanel
Assembly: VRage.Game.dll

Implements:

Fields

TextAlignment Alignment

Alignment for the text and sprites.

Color? Color

Color mask to be used when rendering this layer. If not set, white will be used

string Data

Data to be rendered, depending on what the layer type is. This can be text or a texture path

string FontId

In case we are rendering text, what font to use.

Vector2? Position

Render position for this layer. If not set, it will be placed in the center

float RotationOrScale

Rotation of sprite in radians. Used as scale for text.

Vector2? Size

Render size for this layer. If not set, it will be sized to take up the whole texture

SpriteType Type

Type of the render layer

Constructors

MySprite(SpriteType type = SpriteType.TEXTURE, string data = null, Vector2? position = default, Vector2? size = default, Color? color = default, string fontId = null, TextAlignment alignment = TextAlignment.CENTER, float rotation = 0)

Methods

static MySprite CreateClearClipRect()

static MySprite CreateClipRect(Rectangle rect)

static MySprite CreateSprite(string sprite, Vector2 position, Vector2 size)

static MySprite CreateText(string text, string fontId, Color color, float scale = 1, TextAlignment alignment = TextAlignment.CENTER)

bool Equals(MySprite other)

bool Equals(object obj)

int GetHashCode()

Clone this wiki locally