#include <textview.h>
Public Member Functions | |
| TextView (int x, int y, int columns, int rows) | |
| void | reinit () |
| int | getCursorX () const |
| int | getCursorY () const |
| bool | getCursorEnabled () const |
| int | getWidth () const |
| void | drawChar (int chr, int x, int y) |
| void | drawCharMasked (int chr, int x, int y, byte mask) |
| void | textAt (int x, int y, const char *fmt,...) |
| void | optionAt (int x, int y, char key, const char *fmt,...) |
| void | scroll () |
| void | setCursorFollowsText (bool follows) |
| void | setCursorPos (int x, int y, bool clearOld=true) |
| void | enableCursor () |
| void | disableCursor () |
| void | drawCursor () |
| void | setFontColor (ColorFG fg, ColorBG bg) |
| void | setFontColorFG (ColorFG fg) |
| void | setFontColorBG (ColorBG bg) |
| void | textSelectedAt (int x, int y, const char *text) |
| Common::String | colorizeStatus (char statustype) |
| Common::String | colorizeString (Common::String input, ColorFG color, uint colorstart, uint colorlength=0) |
| char | getOptionAt (const Common::Point &mousePos) |
| void | clearOptions () |
| Common::Rect | getTextBounds (int x, int y, int textWidth) const |
Public Member Functions inherited from Ultima::Ultima4::View | |
| View (int x, int y, int width, int height) | |
| virtual void | clear () |
| virtual void | update () |
| virtual void | update (int x, int y, int width, int height) |
| virtual void | highlight (int x, int y, int width, int height) |
| virtual void | unhighlight () |
Static Public Member Functions | |
| static void | cursorTimer (void *data) |
Protected Attributes | |
| int | _columns |
| int | _rows |
| bool | _cursorEnabled |
| bool | _cursorFollowsText |
| int | _cursorX |
| int | _cursorY |
| int | _cursorPhase |
| Common::Array< Option > | _options |
Protected Attributes inherited from Ultima::Ultima4::View | |
| Common::Rect | _bounds |
| Common::Rect | _highlightBounds |
| bool | _highlighted |
Static Protected Attributes | |
| static Image * | _charset |
Static Protected Attributes inherited from Ultima::Ultima4::View | |
| static Image * | _screen |
Additional Inherited Members | |
Protected Member Functions inherited from Ultima::Ultima4::View | |
| void | drawHighlighted () |
A view of a text area. Keeps track of the cursor position.
|
virtual |
Hook for reinitializing when graphics reloaded.
Reimplemented from Ultima::Ultima4::View.
| void Ultima::Ultima4::TextView::drawChar | ( | int | chr, |
| int | x, | ||
| int | y | ||
| ) |
Draw a character from the charset onto the view.
| void Ultima::Ultima4::TextView::drawCharMasked | ( | int | chr, |
| int | x, | ||
| int | y, | ||
| byte | mask | ||
| ) |
Draw a character from the charset onto the view, but mask it with horizontal lines. This is used for the avatar symbol in the statistics area, where a line is masked out for each virtue in which the player is not an avatar.
| void Ultima::Ultima4::TextView::textAt | ( | int | x, |
| int | y, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Draw text at the given position
| void Ultima::Ultima4::TextView::optionAt | ( | int | x, |
| int | y, | ||
| char | key, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Draw an option at
| void Ultima::Ultima4::TextView::textSelectedAt | ( | int | x, |
| int | y, | ||
| const char * | text | ||
| ) |
Highlight the selected row using a background color
| Common::String Ultima::Ultima4::TextView::colorizeStatus | ( | char | statustype | ) |
Depending on the status type, apply colorization to the character
| Common::String Ultima::Ultima4::TextView::colorizeString | ( | Common::String | input, |
| ColorFG | color, | ||
| uint | colorstart, | ||
| uint | colorlength = 0 |
||
| ) |
Depending on the status type, apply colorization to the character
| char Ultima::Ultima4::TextView::getOptionAt | ( | const Common::Point & | mousePos | ) |
Checks if a given position has an option
| void Ultima::Ultima4::TextView::clearOptions | ( | ) |
Clear the options list
| Common::Rect Ultima::Ultima4::TextView::getTextBounds | ( | int | x, |
| int | y, | ||
| int | textWidth | ||
| ) | const |
Returns the physical screen dimensions of text at a given text location
|
protected |
size of the view in character cells
|
protected |
whether the cursor is enabled
|
protected |
whether the cursor is moved past the last character written
|
protected |
current position of cursor
|
protected |
the rotation state of the cursor
|
staticprotected |
image containing font