|
RB.Print
Method - Static
public static void Print(Vector2i pos, Color32 color, string text)
|
public static void Print(Vector2i pos, Color32 color, int flags, string text)
|
public static void Print(Rect2i rect, Color32 color, int flags, string text)
|
public static void Print(Vector2i pos, Color32 color, FastString text)
|
public static void Print(Vector2i pos, Color32 color, int flags, FastString text)
|
public static void Print(Rect2i rect, Color32 color, int flags, FastString text)
|
public static void Print(FontAsset font, Vector2i pos, Color32 color, string text)
|
public static void Print(FontAsset font, Vector2i pos, Color32 color, int flags, string text)
|
public static void Print(FontAsset font, Rect2i rect, Color32 color, int flags, string text)
|
public static void Print(FontAsset font, Vector2i pos, Color32 color, FastString text)
|
public static void Print(FontAsset font, Vector2i pos, Color32 color, int flags, FastString text)
|
public static void Print(FontAsset font, Rect2i rect, Color32 color, int flags, FastString text)
|
Parameters
Returns
Nothing.
Description
Print text to the display. The position of the text is specified by either pos or rect. When specifying position by rect the flags should also be specified to determine how the text should be aligned and clipped within the given rect.
Multiple flags can be combined together for the desired effect. The following text alignment flags are available:
The following clipping flags are available:
And these miscellaneous flags:
The font used is specified with font which corresponds to the font created with FontAsset.Setup. If no font is specified the RetroBlit built-in system font is used instead.
The color of the text is specified with the color parameter. This is only the starting color which can further be changed inline with the text content.
RetroBlit supports a variety of inline escape sequences to control the appearance of the text. The escape sequences are specified with the "@" character in the given text string. The following escape sequences are supported:
- "@@" - Print @
- "@######" - Color change in the format RRGGBB, where each color channel has a hex value between 00 and FF
- "@-" - Revert back to the color specified in the color parameter.
- "@w###" - Apply a wavy text effect in the format APS (wave amplitude, period, and speed), where each parameter has a value between 0 and 9. Default is "@w000"
- "@s#" - Apply a shaky text effect in the format M (magnitude), where M has a value between 0 and 9. Default is "@s0"
- "@g##" - Change the font to the given 2 digit font index. Default is "@g99" which is a special value indicating built-in system font. The new font must have the same glyph height as the previous font.
Example
See Also
FontAsset
RB.PrintMeasure
RB.FontInlineIndexSetup
See Docs
Features - Fonts
SystemFont - Built-in System Font
|