Ketchup Engine
Loading...
Searching...
No Matches
SpriteString Class Reference

#include <SpriteString.h>

Collaboration diagram for SpriteString:
Collaboration graph

Public Types

using Glyph = KSprite
 

Public Member Functions

 SpriteString ()=delete
 
 SpriteString (std::string text, SpriteFont *font)
 
 SpriteString (const SpriteString &)=delete
 
SpriteStringoperator= (const SpriteString &)=delete
 
 ~SpriteString ()
 
void SetPos (float x, float y)
 Sets the position of the SpriteString.
 
void SetRelScale (float w, float h)
 Sets the relative scale of the SpriteString.
 
void SetText (std::string text)
 Sets the string to be displayed.
 
void Render ()
 Renders this SpriteString to the default UI camera.
 

Private Member Functions

void privRebuild ()
 

Private Attributes

std::string m_text
 
int m_newLineCount
 
int m_len
 
Glyph ** m_glyphs
 
SpriteFontp_font
 
float m_origScrW
 
float m_origScrH
 
float m_x
 
float m_y
 
float m_scrFixedX
 
float m_scrFixedY
 
float m_relW
 
float m_relH
 

Member Typedef Documentation

◆ Glyph

Constructor & Destructor Documentation

◆ SpriteString() [1/3]

SpriteString::SpriteString ( )
delete

◆ SpriteString() [2/3]

SpriteString::SpriteString ( std::string  text,
SpriteFont font 
)

◆ SpriteString() [3/3]

SpriteString::SpriteString ( const SpriteString )
delete

◆ ~SpriteString()

SpriteString::~SpriteString ( )

Member Function Documentation

◆ operator=()

SpriteString & SpriteString::operator= ( const SpriteString )
delete

◆ privRebuild()

void SpriteString::privRebuild ( )
private

◆ Render()

void SpriteString::Render ( )

Renders this SpriteString to the default UI camera.

Haru, 3/19/2023.

◆ SetPos()

void SpriteString::SetPos ( float  x,
float  y 
)

Sets the position of the SpriteString.

Haru, 3/19/2023.

Parameters
xThe x coordinate.
yThe y coordinate.

◆ SetRelScale()

void SpriteString::SetRelScale ( float  w,
float  h 
)

Sets the relative scale of the SpriteString.

Haru, 3/19/2023.

Parameters
wThe width.
hThe height.

◆ SetText()

void SpriteString::SetText ( std::string  text)

Sets the string to be displayed.

Haru, 3/19/2023.

Parameters
textThe text string.

Member Data Documentation

◆ m_glyphs

Glyph** SpriteString::m_glyphs
private

◆ m_len

int SpriteString::m_len
private

◆ m_newLineCount

int SpriteString::m_newLineCount
private

◆ m_origScrH

float SpriteString::m_origScrH
private

◆ m_origScrW

float SpriteString::m_origScrW
private

◆ m_relH

float SpriteString::m_relH
private

◆ m_relW

float SpriteString::m_relW
private

◆ m_scrFixedX

float SpriteString::m_scrFixedX
private

◆ m_scrFixedY

float SpriteString::m_scrFixedY
private

◆ m_text

std::string SpriteString::m_text
private

◆ m_x

float SpriteString::m_x
private

◆ m_y

float SpriteString::m_y
private

◆ p_font

SpriteFont* SpriteString::p_font
private

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