Mod Helpers  v5.9.6
A centralized collection of library code, helpful services, and end-user functions for mod management and information.
HamstarHelpers.Helpers.Draw.DrawHelpers Class Reference

Assorted static "helper" functions pertaining to drawing to the screen. More...

Static Public Member Functions

static void DrawBorderedRect (SpriteBatch sb, Color bgColor, Color borderColor, Vector2 position, Vector2 size, int borderWidth)
 Draws a bordered rectangle. More...
 
static void DrawBorderedRect (SpriteBatch sb, Color bgColor, Color borderColor, Rectangle rect, int borderWidth)
 Draws a bordered rectangle. More...
 
static void DrawBorderedRect (SpriteBatch sb, Color? bgColor, Color? borderColor, Vector2 position, Vector2 size, int borderWidth)
 Draws a rectangle with an optional border or optional fill color. More...
 
static void DrawBorderedRect (SpriteBatch sb, Color? bgColor, Color? borderColor, Rectangle rect, int borderWidth)
 Draws a rectangle with an optional border or optional fill color. More...
 
static void DrawTerrariaString (SpriteBatch sb, string text, Vector2 pos, float scale)
 Draws a "Terraria style" string, complete with pulsing and black border. More...
 

Detailed Description

Assorted static "helper" functions pertaining to drawing to the screen.

Definition at line 12 of file DrawHelpers.cs.

Member Function Documentation

◆ DrawBorderedRect() [1/4]

static void HamstarHelpers.Helpers.Draw.DrawHelpers.DrawBorderedRect ( SpriteBatch  sb,
Color  bgColor,
Color  borderColor,
Vector2  position,
Vector2  size,
int  borderWidth 
)
static

Draws a bordered rectangle.

Parameters
sbThe spriteBatch to draw to. Typically Main.spriteBatch.
bgColorFill color.
borderColor
position
size
borderWidth

Definition at line 22 of file DrawHelpers.cs.

◆ DrawBorderedRect() [2/4]

static void HamstarHelpers.Helpers.Draw.DrawHelpers.DrawBorderedRect ( SpriteBatch  sb,
Color  bgColor,
Color  borderColor,
Rectangle  rect,
int  borderWidth 
)
static

Draws a bordered rectangle.

Parameters
sbThe spriteBatch to draw to. Typically Main.spriteBatch.
bgColorFill color.
borderColor
rectPosition and dimensions of rectangle.
borderWidth

Definition at line 33 of file DrawHelpers.cs.

◆ DrawBorderedRect() [3/4]

static void HamstarHelpers.Helpers.Draw.DrawHelpers.DrawBorderedRect ( SpriteBatch  sb,
Color?  bgColor,
Color?  borderColor,
Vector2  position,
Vector2  size,
int  borderWidth 
)
static

Draws a rectangle with an optional border or optional fill color.

Parameters
sbThe spriteBatch to draw to. Typically Main.spriteBatch.
bgColorFill color. Use null for transparent.
borderColorBorder color. User `null for transparent.
position
size
borderWidth

Definition at line 46 of file DrawHelpers.cs.

◆ DrawBorderedRect() [4/4]

static void HamstarHelpers.Helpers.Draw.DrawHelpers.DrawBorderedRect ( SpriteBatch  sb,
Color?  bgColor,
Color?  borderColor,
Rectangle  rect,
int  borderWidth 
)
static

Draws a rectangle with an optional border or optional fill color.

Parameters
sbThe spriteBatch to draw to. Typically Main.spriteBatch.
bgColorFill color. Use null for transparent.
borderColorBorder color. User `null for transparent.
rectPosition and dimensions of rectangle.
borderWidth

Definition at line 65 of file DrawHelpers.cs.

◆ DrawTerrariaString()

static void HamstarHelpers.Helpers.Draw.DrawHelpers.DrawTerrariaString ( SpriteBatch  sb,
string  text,
Vector2  pos,
float  scale 
)
static

Draws a "Terraria style" string, complete with pulsing and black border.

Parameters
sb
text
pos
scale

Definition at line 87 of file DrawHelpers.cs.


The documentation for this class was generated from the following files: