|
| RichText (string str, string font="", int size=16, int textWidth=-1, int textHeight=-1) |
| Create a new RichText object. More...
|
|
| RichText (string str, Stream font, int size=16, int textWidth=-1, int textHeight=-1) |
| Create a new RichText object. More...
|
|
| RichText (string str, BaseFont font, int size=16, int textWidth=-1, int textHeight=-1) |
|
| RichText (string str, RichTextConfig config, int textWidth=-1, int textHeight=-1) |
| Create a new RichText object using a RichTextConfig. More...
|
|
| RichText (string str, int size) |
| Create a new RichText object. More...
|
|
| RichText (int size=16) |
| Create a new RichText object. More...
|
|
| RichText (RichTextConfig config) |
| Create a new RichText object More...
|
|
void | CenterTextOrigin () |
| Center the RichText's origin. This factors in the RichText's local bounds. More...
|
|
void | CenterTextOriginY () |
| Center the RichText's Y origin. This factors in the RichText's top bounds. More...
|
|
void | CenterTextOriginX () |
| Center the RichText's X origin. This factors in the RichText's left bounds. More...
|
|
override void | CenterOrigin () |
| Centers the graphic origin. More...
|
|
string | PreWrap (string str) |
| Insert new lines into a string to prepare it for word wrapping with this object's width. This function will not wrap text if AutoWidth is true! More...
|
|
float | GetLineWidth (int lineNumber) |
| The line width in pixels of a specific line. More...
|
|
void | Refresh () |
| Refresh the text. This will reapply all commands and update the text image. More...
|
|
override void | Update () |
| Update the RichText. More...
|
|
T | GetFont< T > () |
| Gets the font. More...
|
|
Transformation | AddTransform (Transformation transform) |
|
Transformation | AddTransform (Vector2 translation, Vector2 scale, Vector2 origin, float rotation) |
|
Transformation | AddTransform () |
|
Transformation | RemoveTransformation (Transformation transform) |
|
Transformation | PopTransformation () |
|
virtual void | ClearShader () |
| Removes the shader from the graphic. More...
|
|
void | SetPosition (float x, float y) |
| Set the position of the Graphic. More...
|
|
void | SetPosition (Graphic g, float offsetX=0, float offsetY=0) |
| Set the position of the Graphic. More...
|
|
void | SetPosition (Vector2 xy) |
| Set the position of the Graphic. More...
|
|
void | SetOrigin (float x, float y) |
| Set the origin of the Graphic. More...
|
|
void | SetOrigin (Vector2 xy) |
| Set the origin of the Graphic. More...
|
|
void | SetTexture (string path) |
| Set the Texture that the Graphic is using (if it is using one.) More...
|
|
void | SetTexture (Texture texture) |
| Set the Texture that the Graphic is using (if it is using one.) More...
|
|
void | SetTexture (AtlasTexture atlasTexture) |
| Set the Texture that the Graphic is using (if it is using one.) More...
|
|
virtual void | CenterOriginZero () |
| Centers the graphic origin while retaining its relative position. More...
|
|
virtual void | Render (float x=0, float y=0) |
| Draws the graphic. More...
|
|
|
TextAlign | TextAlign = TextAlign.Left |
| The alignment of the text. Left, Right, or Center. More...
|
|
char | CommandOpen = '{' |
| The character used to mark an opening of a command. More...
|
|
char | CommandClose = '}' |
| The character used to mark the closing of a command. More...
|
|
char | CommandDelim = ':' |
| The character used to separate the command with the command value. More...
|
|
int | MonospaceWidth = -1 |
| Controls the spacing between each character. If set above 0 the text will use a monospacing. More...
|
|
float | DefaultSineAmpX |
| The default horizontal amplitude of the sine wave. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultSineAmpY |
| The default vertical amplitude of the sine wave. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultSineRateX = 1 |
| The default horizontal rate of the sine wave. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultSineRateY = 1 |
| The default vertical rate of the sine wave. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultSineOffsetX |
| The default horizontal offset of the sine wave. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultSineOffsetY |
| The default vertical offset of the sine wave. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultOffsetAmount = 10 |
| The default amount to offset each character for sine wave related transformations. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultShadowX |
| The default X position of the text shadow. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultShadowY |
| The default Y position of the text shadow. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultOutlineThickness |
| The default outline thickness. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultShakeX |
| The default horizontal shaking effect. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultShakeY |
| The default vertical shaking effect. Will not take effect until the string changes, or Refresh() is called. More...
|
|
Color | DefaultCharColor = Color.White |
| The default character color. Will not take effect until the string changes, or Refresh() is called. More...
|
|
Color | DefaultCharColor0 = Color.White |
| The default color of the top left corner of each character. Will not take effect until the string changes, or Refresh() is called. More...
|
|
Color | DefaultCharColor1 = Color.White |
| The default color of the top right corner of each character. Will not take effect until the string changes, or Refresh() is called. More...
|
|
Color | DefaultCharColor2 = Color.White |
| The default color of the bottom right corner of each character. Will not take effect until the string changes, or Refresh() is called. More...
|
|
Color | DefaultCharColor3 = Color.White |
| The default color of the bottom left corner of each character. Will not take effect until the string changes, or Refresh() is called. More...
|
|
Color | DefaultShadowColor = Color.Black |
| The default shadow color. Will not take effect until the string changes, or Refresh() is called. More...
|
|
Color | DefaultOutlineColor = Color.White |
| The default outline color. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultScaleX = 1 |
| The default x scale of the characters. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultScaleY = 1 |
| The default y scale of the characters. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | DefaultAngle = 0 |
| The default angle of the characters. Will not take effect until the string changes, or Refresh() is called. More...
|
|
float | LineHeight = 1 |
| The line height. 1 is 100% of the normal line height for the font. More...
|
|
float | LetterSpacing = 1 |
| The letter spacing. 1 is 100% of the normal letter spacing. More...
|
|
float | OffsetX |
| How far to offset the text rendering horizontally from the origin. More...
|
|
float | OffsetY |
| How far to offset the text rendering vertically from the origin. More...
|
|
List< Transformation > | Transforms = new List<Transformation>() { new Transformation() } |
|
bool | Relative = true |
| Determines if the Graphic is rendered relative to its Entity. More...
|
|
bool | Visible = true |
| Determines if the Graphic will render. More...
|
|
float | ScrollX = 1 |
| The scroll factor for the x position. Used for parallax like effects. Values lower than 1 will scroll slower than the camera (appear to be further away) and values higher than 1 will scroll faster than the camera (appear to be closer.) More...
|
|
float | ScrollY = 1 |
| The scroll factor for the y position. Used for parallax like effects. Values lower than 1 will scroll slower than the camera (appear to be further away) and values higher than 1 will scroll faster than the camera (appear to be closer.) More...
|
|
float | ShakeX |
| The horizontal amount to randomly offset the graphic by each frame. More...
|
|
float | ShakeY |
| The vertial amount to randomly offset the graphic by each frame. More...
|
|
Rectangle | TextureRegion |
| The region to render the Texture with. More...
|
|
Rectangle | AtlasRegion |
| The Rectangle to render an AtlasTexture with. More...
|
|
Shader | Shader |
| The shader to be applied to this graphic. More...
|
|
string | Name = "Graphic" |
| The name of the graphic. More...
|
|
BlendMode | Blend = BlendMode.Alpha |
| The blend mode to be applied to this graphic. More...
|
|
bool | RepeatX |
| Determines if the image should be rendered multiple times horizontally. More...
|
|
bool | RepeatY |
| Determines if the image should be rendered multiple times vertically. More...
|
|
|
bool | Monospaced [get] |
| True if the text is using MonospaceWidth. More...
|
|
int | TextWidth [get, set] |
| The width of the text box. If not set it will be automatically set. More...
|
|
int | TextHeight [get, set] |
| The height of the text box. If not set it will be automatically set. More...
|
|
float | LineSpacing [get] |
| The line spacing between each vertical line. More...
|
|
bool | WordWrap [get, set] |
| Determines if the text will automatically wrap. This will not work unless TextWidth is set. More...
|
|
int | FontSize [get, set] |
| The font size of the text. More...
|
|
bool | AutoWidth [get] |
| True of the width was not manually set. More...
|
|
bool | AutoHeight [get] |
| True if the height was not manually set. More...
|
|
string | CleanString [get] |
| The string to display stripped of all commands. More...
|
|
float | LongestLine [get] |
| The pixel width of the longest line in the displayed string. More...
|
|
string[] | Lines [get, set] |
| The displayed string broken up into an array by lines. More...
|
|
int | NumLines [get] |
| The total number of lines in the displayed string. More...
|
|
string | String [get, set] |
| The string to display. This string can contain commands to alter the text dynamically. More...
|
|
int | CharacterCount [get] |
| The character count of the string without formatting commands. More...
|
|
float | BoundsTop [get] |
| The top bounds of the RichText. More...
|
|
float | BoundsLeft [get] |
| The top bounds of the RichText. More...
|
|
RichTextCharacter | this[int index] [get, set] |
| Retrieve the RichTextCharacter from the string. More...
|
|
Transformation | Transform [get] |
|
float | X [get, set] |
| The X position of the Graphic. More...
|
|
float | Y [get, set] |
| The Y position of the Graphic. More...
|
|
float | ScaleX [get, set] |
| The horizontal scale of the graphic. Used in the final transformation. More...
|
|
float | ScaleY [get, set] |
| The vertical scale of the graphic. Used in the final transformation. More...
|
|
float | Angle [get, set] |
| The angle of rotation of the graphic. Used in the final transformation. More...
|
|
float | OriginX [get, set] |
| The X origin point to scale and rotate the graphic with. Used in the final transformation. More...
|
|
float | OriginY [get, set] |
| The Y origin point to scale and rotate the graphic with. Used in the final transformation. More...
|
|
Color | Color [get, set] |
| The base color of the Graphic. Multiplies the vertices of the graphic by this color. More...
|
|
virtual Texture | Texture [get, set] |
| The texture that the graphic is using. More...
|
|
float | Alpha [get, set] |
| The base transparency of the graphic. A shortcut to access the base color's Alpha. More...
|
|
int | Width [get, set] |
| The width of the Graphic. More...
|
|
int | Height [get, set] |
| The height of the Graphic. More...
|
|
float | ScaledWidth [get, set] |
| The width in pixels of the image after applying the X scale. More...
|
|
float | ScaledHeight [get, set] |
| The height in pixels of the image after applying the Y scale. More...
|
|
virtual bool | Smooth [get, set] |
| Smooth the texture of a sprite image while scaling it. More...
|
|
float | Scroll [get, set] |
| Set both ScrollX and ScrollY. More...
|
|
float | HalfWidth [get] |
| Half of the width. More...
|
|
float | HalfHeight [get] |
| Half of the height. More...
|
|
float | Scale [set] |
| Sets both the ScaleX and ScaleY at the same time. More...
|
|
bool | Repeat [set] |
| Sets both RepeatX and RepeatY at the same time. More...
|
|
float | Shake [set] |
| A shortcut to set both ShakeX and ShakeY. More...
|
|
float | Left [get] |
| The X position of the left side of the Graphic. More...
|
|
float | Top [get] |
| The Y position of the top of the Graphic. More...
|
|
float | Right [get] |
| The X position of the right side of the Graphic. More...
|
|
float | Bottom [get] |
| The Y position of the bottom of the Graphic. More...
|
|
int | TextureLeft [get] |
| The X position of the left of the Texture. More...
|
|
int | TextureRight [get] |
| The X position of the right of the Texture. More...
|
|
int | TextureTop [get] |
| The Y position of the top of the Texture. More...
|
|
int | TextureBottom [get] |
| The Y position of the bottom of the Texture. More...
|
|
Graphic that renders text with some more options than normal Text. RichText can be very slow to render with large strings of text so be careful! For large blocks of text use the normal Text graphic.
richText.String = "Hello, {color:f00}this text is red!{clear} {shake:4}Shaking text!"; Commands: {clear} - Clear all styles and reset back to normal, white text. {style:name} - Apply the style 'name' to text. Create styles with AddStyle(). {color:fff} - Colors text. Strings of 3, 4, 6, or 8 hex digits allowed. {color0:fff} - Colors the top left corner of characters. Strings of 3, 4, 6, or 8 hex digits allowed. {color1:fff} - Colors the top right corner of characters. Strings of 3, 4, 6, or 8 hex digits allowed. {color2:fff} - Colors the bottom right corner of characters. Strings of 3, 4, 6, or 8 hex digits allowed. {color3:fff} - Colors the bottom left corner of characters. Strings of 3, 4, 6, or 8 hex digits allowed. {colorShadow:fff} - Colors text shadow. Strings of 3, 4, 6, or 8 hex digits allowed. {colorOutline:fff} - Colors text outline. Strings of 3, 4, 6, or 8 hex digits allowed. {shadowX:0} - Set the drop shadow of the text on the X axis. {shadowY:0} - Set the drop shadow of the text on the Y axis. {shadow:0} - Set the drop shadow of the text on the X and Y axes. {outline:0} - Set the outline thickness on text. {shakeX:0} - Shake the text on the X axis with a float range. {shakeY:0} - Shake the text on the Y axis with a float range. {shake:0} - Shake the text on the X and Y axes with a float range. {waveAmpX:0} - Wave the text on the X axis with a float range. {waveAmpY:0} - Wave the text on the Y axis with a float range. {waveAmp:0} - Wave the text on the X and Y axes with a float range. {waveRateX:0} - Set the wave speed for the X axis. {waveRateY:0} - Set the wave speed for the Y axis. {waveRate:0} - Set the wave speed for the X and Y axes. {waveOffsetX:0} - Set the wave offset for the X axis. {waveOffsetY:0} - Set the wave offset for the Y axis. {waveOffset:0} - Set the wave offset for the X and Y axes. {offset:0} - Set the offset rate for characters. {charOffsetX:0} - Set the character offset X for the BitmapFont. {charOffsetY:0} - Set the character offset Y for the BitmapFont.