Table of Contents

Class ImageCodeExtensions

Namespace
MLEM.Formatting.Codes
Assembly
MLEM.dll

A set of extensions that allow easily adding image formatting codes to a text formatter.

public static class ImageCodeExtensions
Inheritance
ImageCodeExtensions
Inherited Members

Methods

AddImage(TextFormatter, string, SpriteAnimation, bool)

Adds a new image formatting code to the given text formatter

public static void AddImage(this TextFormatter formatter, string name, SpriteAnimation image, bool copyTextColor = false)

Parameters

formatter TextFormatter

The formatter to add the code to

name string

The name of the formatting code. The regex for this code will be between angle brackets.

image SpriteAnimation

The image to render at the code's position

copyTextColor bool

Whether or not the image code should use the text's color instead of White

AddImage(TextFormatter, string, TextureRegion, bool)

Adds a new image formatting code to the given text formatter

public static void AddImage(this TextFormatter formatter, string name, TextureRegion image, bool copyTextColor = false)

Parameters

formatter TextFormatter

The formatter to add the code to

name string

The name of the formatting code. The regex for this code will be between angle brackets.

image TextureRegion

The image to render at the code's position

copyTextColor bool

Whether or not the image code should use the text's color instead of White