jjTEXTAPPEARANCE struct
#include <Jazz2/Scripting/Legacy/Canvas.h>
Layout and styling options for drawn text.
Passed to jjCANVAS::
Public types
- enum align_ { align_DEFAULT, align_LEFT, align_CENTER, align_RIGHT }
- enum ch_ { ch_HIDE, ch_DISPLAY, ch_SPECIAL }
Public static functions
- static void constructor(void* self)
- Creates a default appearance.
-
static void constructorMode(std::
uint32_t mode, void* self) - Creates an appearance that matches a STRING::Mode.
Public functions
-
auto operator=(std::
uint32_t other) -> jjTEXTAPPEARANCE& - Applies the settings of a STRING::Mode.
Public variables
-
std::
int32_t xAmp partially supported - Horizontal movement of the letters.
-
std::
int32_t yAmp partially supported - Vertical movement of the letters.
-
std::
int32_t spacing - Spacing between characters in pixels.
- bool monospace partially supported
- Whether every character takes the same width (currently ignored).
- bool skipInitialHash partially supported
- Whether a
#at the very start of the text is left out (currently ignored). - ch_ at partially supported
- Treatment of the
@character. - ch_ caret partially supported
- Treatment of the
^character. - ch_ hash partially supported
- Treatment of the
#character. - ch_ newline
- Treatment of the line feed character.
- ch_ pipe partially supported
- Treatment of the
|character. - ch_ section partially supported
- Treatment of the
§character. - ch_ tilde partially supported
- Treatment of the
~character. - align_ align
- Horizontal alignment of the text.
Function documentation
static void Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: constructor(void* self)
Creates a default appearance.
Spacing is 1, the letters don't move, alignment is DEFAULT and every special character is hidden.
static void Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: constructorMode(std:: uint32_t mode,
void* self)
Creates an appearance that matches a STRING::Mode.
Spacing is 1. RIGHTALIGN aligns the text to the right, BOUNCE sets yAmp, and SPIN sets both amplitudes and lets line feeds start new lines. Everything else is as in the default appearance.
jjTEXTAPPEARANCE& Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: operator=(std:: uint32_t other)
Applies the settings of a STRING::Mode.
Sets spacing, xAmp, yAmp, align and newline as the constructor taking a mode does, other properties keep their values.
Variable documentation
std:: int32_t Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: xAmp
Horizontal movement of the letters.
For text in a built-in size, a non-zero value together with a non-zero yAmp makes the letters spin in place.
std:: int32_t Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: yAmp
Vertical movement of the letters.
For text in a built-in size, a non-zero value makes the letters bounce up and down (or spin, if xAmp is non-zero too).
std:: int32_t Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: spacing
Spacing between characters in pixels.
Added after each character. Defaults to 1.
bool Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: monospace
Whether every character takes the same width (currently ignored).
bool Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: skipInitialHash
Whether a # at the very start of the text is left out (currently ignored).
ch_ Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: at
Treatment of the @ character.
With STRING::DISPLAYSIGN it is drawn as a regular character, otherwise it starts a new line. Applies to text drawn with a font animation.
ch_ Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: caret
Treatment of the ^ character.
With STRING::DISPLAYSIGN it is drawn as a regular character, otherwise it is left out. Applies to text drawn with a font animation.
ch_ Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: hash
Treatment of the # character.
With STRING::DISPLAYSIGN it is drawn as a regular character, otherwise it is left out. Applies to text drawn with a font animation.
ch_ Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: newline
Treatment of the line feed character.
For text in a built-in size, STRING::SPECIALSIGN makes \n start a new line. Text drawn with a font animation always breaks lines at it.
ch_ Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: pipe
Treatment of the | character.
With STRING::DISPLAYSIGN it is drawn as a regular character, otherwise it is left out. Applies to text drawn with a font animation.
ch_ Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: section
Treatment of the § character.
With STRING::DISPLAYSIGN it is drawn as a regular character, otherwise it is left out. Applies to text drawn with a font animation.
ch_ Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: tilde
Treatment of the ~ character.
With STRING::DISPLAYSIGN it is drawn as a regular character, otherwise it is left out. Applies to text drawn with a font animation.
align_ Jazz2:: Scripting:: Legacy:: jjTEXTAPPEARANCE:: align
Horizontal alignment of the text.
LEFT, CENTER and RIGHT align the text against the given x coordinate. With DEFAULT, the x coordinate itself selects the alignment on the HUD: below 0x4000 the text starts there, from 0x4000 it is centered on the screen and shifted by xPixel - 0x8000, and from 0xC000 its right side is aligned to the right edge, moved left by xPixel - 0x10000.