Barotrauma Client Doc
Barotrauma.UISprite Class Reference

Public Member Functions

 UISprite (ContentXElement element)
 
float GetSliceBorderScale (Point drawSize)
 Get the scale of the sliced sprite's borders when it's draw inside an area of a specific size More...
 
void Draw (SpriteBatch spriteBatch, RectangleF rect, Color color, SpriteEffects spriteEffects=SpriteEffects.None, Vector2? uvOffset=null)
 
void Draw (SpriteBatch spriteBatch, Rectangle rect, Color color, SpriteEffects spriteEffects=SpriteEffects.None, Vector2? uvOffset=null)
 

Properties

Sprite Sprite [get]
 
bool Tile [get]
 
bool Slice [get]
 
Rectangle[] Slices [get, set]
 
Point NonSliceSize [get, set]
 The size of fixed area around the slice area More...
 
bool MaintainAspectRatio [get]
 
bool MaintainBorderAspectRatio [get]
 
bool CrossFadeIn = true [get]
 
bool CrossFadeOut = true [get]
 
TransitionMode TransitionMode [get]
 

Detailed Description

Definition at line 8 of file UISprite.cs.

Constructor & Destructor Documentation

◆ UISprite()

Barotrauma.UISprite.UISprite ( ContentXElement  element)

Definition at line 58 of file UISprite.cs.

Member Function Documentation

◆ Draw() [1/2]

void Barotrauma.UISprite.Draw ( SpriteBatch  spriteBatch,
Rectangle  rect,
Color  color,
SpriteEffects  spriteEffects = SpriteEffects.None,
Vector2?  uvOffset = null 
)

Definition at line 123 of file UISprite.cs.

◆ Draw() [2/2]

void Barotrauma.UISprite.Draw ( SpriteBatch  spriteBatch,
RectangleF  rect,
Color  color,
SpriteEffects  spriteEffects = SpriteEffects.None,
Vector2?  uvOffset = null 
)

◆ GetSliceBorderScale()

float Barotrauma.UISprite.GetSliceBorderScale ( Point  drawSize)

Get the scale of the sliced sprite's borders when it's draw inside an area of a specific size

Definition at line 110 of file UISprite.cs.

Property Documentation

◆ CrossFadeIn

bool Barotrauma.UISprite.CrossFadeIn = true
get

Definition at line 53 of file UISprite.cs.

◆ CrossFadeOut

bool Barotrauma.UISprite.CrossFadeOut = true
get

Definition at line 54 of file UISprite.cs.

◆ MaintainAspectRatio

bool Barotrauma.UISprite.MaintainAspectRatio
get

Definition at line 35 of file UISprite.cs.

◆ MaintainBorderAspectRatio

bool Barotrauma.UISprite.MaintainBorderAspectRatio
get

Definition at line 41 of file UISprite.cs.

◆ NonSliceSize

Point Barotrauma.UISprite.NonSliceSize
getset

The size of fixed area around the slice area

Definition at line 33 of file UISprite.cs.

◆ Slice

bool Barotrauma.UISprite.Slice
get

Definition at line 22 of file UISprite.cs.

◆ Slices

Rectangle [] Barotrauma.UISprite.Slices
getset

Definition at line 24 of file UISprite.cs.

◆ Sprite

Sprite Barotrauma.UISprite.Sprite
get

Definition at line 10 of file UISprite.cs.

◆ Tile

bool Barotrauma.UISprite.Tile
get

Definition at line 16 of file UISprite.cs.

◆ TransitionMode

TransitionMode Barotrauma.UISprite.TransitionMode
get

Definition at line 56 of file UISprite.cs.