Cavestory Mod API
Public Member Functions | Public Attributes | List of all members
SpecialTextCache Struct Reference

A cache object to store parsed special text. More...

#include <CSMAPI_drawing.h>

Public Member Functions

 SpecialTextCache ()
 Constructor.
 
 ~SpecialTextCache ()
 Deconstructor.
 
bool Parse (FontObject *pFont, const char *pString, int iLength=-1, unsigned long iColor=0xFFFFFFFF, int iDestWidth=0)
 Parse a string. More...
 
void Free ()
 Free this object's cache.
 

Public Attributes

GUI_RECT rect
 The draw rect. More...
 
GUI_POINT mTotalSize
 The total size of the text, including font changes, new lines, etc.
 
List< SpecialTextNode * > mTextList
 Node list for this cache.
 
char * mFullText
 The full text for this cache.
 
int mFullTextSize
 
int mFullTextLen
 

Detailed Description

A cache object to store parsed special text.

Member Function Documentation

◆ Parse()

bool SpecialTextCache::Parse ( FontObject *  pFont,
const char *  pString,
int  iLength = -1,
unsigned long  iColor = 0xFFFFFFFF,
int  iDestWidth = 0 
)

Parse a string.

Parameters
pFontThe font to draw the string with.
pStringThe string to parse.
iLengthThe length of the string. If -1, then it will be determined using 'strlen()'.
iColorThe starting color of the text.
iDestWidthThe width of the rect where the text will be drawn. If you want to enable text wrapping, then set this to anything but 0.
Returns
Returns true on success.

Member Data Documentation

◆ rect

GUI_RECT SpecialTextCache::rect

The draw rect.

This doesn't affect anything at the moment.


The documentation for this struct was generated from the following file: