|
| CTextControl (uint count=10) |
|
void | setup () |
|
void | load (SimpleFile *file, int param) |
|
void | save (SimpleFile *file, int indent) |
|
void | setBounds (const Rect &bounds) |
|
void | setHasBorder (bool val) |
|
void | draw (CScreenManager *screenManager) |
|
void | resize (uint count) |
|
CString | getText () const |
|
void | setText (const CString &str) |
|
void | setText (StringId stringId) |
|
void | setColor (uint col) |
|
void | setColor (byte r, byte g, byte b) |
|
void | setLineColor (uint lineNum, byte r, byte g, byte b) |
|
void | setLineColor (uint lineNum, uint col) |
|
void | setMaxCharsPerLine (int maxChars) |
|
void | deleteLastChar () |
|
void | setNPC (int npcFlag, int npcId) |
|
int | displayEndIndex () const |
|
void | scrollUp (CScreenManager *screenManager) |
|
void | scrollDown (CScreenManager *screenManager) |
|
void | scrollUpPage (CScreenManager *screenManager) |
|
void | scrollDownPage (CScreenManager *screenManager) |
|
void | scrollToTop (CScreenManager *screenManager) |
|
void | scrollToBottom (CScreenManager *screenManager) |
|
void | addLine (const CString &str) |
|
void | addLine (const CString &str, uint color) |
|
void | addLine (const CString &str, byte r, byte g, byte b) |
|
bool | handleKey (char c) |
|
void | showCursor (int mode) |
|
void | hideCursor () |
|
int | getNPCNum (uint ident, uint startIndex) |
|
void | remapColors (uint count, uint *srcColors, uint *destColors) |
|
void | setFontNumber (int fontNumber) |
|
int | getTextWidth (CScreenManager *screenManager) |
|
int | getTextHeight (CScreenManager *screenManager) |
|
◆ setup()
void Titanic::CTextControl::setup |
( |
| ) |
|
◆ load()
void Titanic::CTextControl::load |
( |
SimpleFile * |
file, |
|
|
int |
param |
|
) |
| |
Load the data for the control
◆ save()
void Titanic::CTextControl::save |
( |
SimpleFile * |
file, |
|
|
int |
indent |
|
) |
| |
Save the data for the control
◆ setBounds()
void Titanic::CTextControl::setBounds |
( |
const Rect & |
bounds | ) |
|
|
inline |
Set the bounds for the control
◆ setHasBorder()
void Titanic::CTextControl::setHasBorder |
( |
bool |
val | ) |
|
|
inline |
Sets the flag for whether to draw a frame border around the control
◆ draw()
◆ getText()
CString Titanic::CTextControl::getText |
( |
| ) |
const |
Returns the text from all the lines as a single string
◆ setText() [1/2]
void Titanic::CTextControl::setText |
( |
const CString & |
str | ) |
|
◆ setText() [2/2]
void Titanic::CTextControl::setText |
( |
StringId |
stringId | ) |
|
◆ setColor() [1/2]
void Titanic::CTextControl::setColor |
( |
uint |
col | ) |
|
◆ setColor() [2/2]
void Titanic::CTextControl::setColor |
( |
byte |
r, |
|
|
byte |
g, |
|
|
byte |
b |
|
) |
| |
◆ setLineColor() [1/2]
void Titanic::CTextControl::setLineColor |
( |
uint |
lineNum, |
|
|
byte |
r, |
|
|
byte |
g, |
|
|
byte |
b |
|
) |
| |
◆ getColorText()
static CString Titanic::CTextControl::getColorText |
( |
byte |
r, |
|
|
byte |
g, |
|
|
byte |
b |
|
) |
| |
|
static |
Gets the text string representing a color encoding
◆ setLineColor() [2/2]
void Titanic::CTextControl::setLineColor |
( |
uint |
lineNum, |
|
|
uint |
col |
|
) |
| |
◆ setMaxCharsPerLine()
void Titanic::CTextControl::setMaxCharsPerLine |
( |
int |
maxChars | ) |
|
Sets the maximum number of characters per line
◆ deleteLastChar()
void Titanic::CTextControl::deleteLastChar |
( |
| ) |
|
Delete the last character from the last line
◆ setNPC()
void Titanic::CTextControl::setNPC |
( |
int |
npcFlag, |
|
|
int |
npcId |
|
) |
| |
Sets the current NPC text is being added for
◆ displayEndIndex()
int Titanic::CTextControl::displayEndIndex |
( |
| ) |
const |
|
inline |
Returns the character index into _lines of the last character to be displayed on-screen
◆ scrollUp()
void Titanic::CTextControl::scrollUp |
( |
CScreenManager * |
screenManager | ) |
|
◆ scrollDown()
void Titanic::CTextControl::scrollDown |
( |
CScreenManager * |
screenManager | ) |
|
◆ scrollUpPage()
void Titanic::CTextControl::scrollUpPage |
( |
CScreenManager * |
screenManager | ) |
|
Scroll the text up one page
◆ scrollDownPage()
void Titanic::CTextControl::scrollDownPage |
( |
CScreenManager * |
screenManager | ) |
|
Scroll the text down one page
◆ scrollToTop()
void Titanic::CTextControl::scrollToTop |
( |
CScreenManager * |
screenManager | ) |
|
Scroll to the top of the text
◆ scrollToBottom()
void Titanic::CTextControl::scrollToBottom |
( |
CScreenManager * |
screenManager | ) |
|
Scroll to the bottom of the text
◆ addLine() [1/3]
void Titanic::CTextControl::addLine |
( |
const CString & |
str | ) |
|
◆ addLine() [2/3]
void Titanic::CTextControl::addLine |
( |
const CString & |
str, |
|
|
uint |
color |
|
) |
| |
◆ addLine() [3/3]
void Titanic::CTextControl::addLine |
( |
const CString & |
str, |
|
|
byte |
r, |
|
|
byte |
g, |
|
|
byte |
b |
|
) |
| |
◆ handleKey()
bool Titanic::CTextControl::handleKey |
( |
char |
c | ) |
|
Handles character processing to add or remove characters to the current text line
- Returns
- True if the Enter key was pressed
◆ showCursor()
void Titanic::CTextControl::showCursor |
( |
int |
mode | ) |
|
Attaches the current system cursor to the text control, and give it suitable defaults
◆ hideCursor()
void Titanic::CTextControl::hideCursor |
( |
| ) |
|
Removes the cursor attached to the text
◆ getNPCNum()
int Titanic::CTextControl::getNPCNum |
( |
uint |
ident, |
|
|
uint |
startIndex |
|
) |
| |
Get an NPC Number embedded within on-screen text. Used by the PET log to encode which NPC spoke
- Parameters
-
ident | Npc Type. Always passed as 1 |
startIndex | Starting index to scan backwards through the log text to find an NPC ident sequence |
◆ remapColors()
void Titanic::CTextControl::remapColors |
( |
uint |
count, |
|
|
uint * |
srcColors, |
|
|
uint * |
destColors |
|
) |
| |
Replaces any occurrences of line colors that appear in the first list with the entry at the same index in the dest list
◆ setFontNumber()
void Titanic::CTextControl::setFontNumber |
( |
int |
fontNumber | ) |
|
Set the font number to use
◆ getTextWidth()
int Titanic::CTextControl::getTextWidth |
( |
CScreenManager * |
screenManager | ) |
|
Get the width of the text
◆ getTextHeight()
int Titanic::CTextControl::getTextHeight |
( |
CScreenManager * |
screenManager | ) |
|
Get the required height to draw the text
The documentation for this class was generated from the following file: