Layout Tags
A format created by @catnipped for use in an upcoming game,
and is now used in the tektite package - check it out!
It is using the same syntax rules as FenTags.
Commands
Commands are based on the FenTags syntax, with the following commands:
[color rgba(R, G, B, A)]. Example:[color rgba(10, 20, 30, 244)],[color rgba(10, 20, 30, 0.1)],[color rgb(10, 20, 30)]. you can use 0-255 or 0.0..1.0.[color reset]. Resets the previous color to default.[icon Int]. Example:[icon 42]. Selects an icon with that ID.[font Int]. Example[font 32]. Selects the active font using that handle.[font reset]. Selects the default font[lineheight Int]. Selects which lineheight to use (in pixels). Example:[lineheight 16].[region Int] ... [/region]Defines a tagged region with the given ID. Example:
[region 2][icon 99] Hello![/region]
[newline]. Moves cursor to a new line.
Structs
ColorRgba
struct ColorRgba {
a: U8
b: U8
g: U8
r: U8
}
ColorRgb
struct ColorRgb {
b: U8
g: U8
r: U8
}
Parser
struct Parser {
}
Member Functions
parse
fn Parser::parse(input: String) -> VecLikeView<Element>
Enums
Element
enum Element {
String(String<256>)
ColorRgb(ColorRgb)
ColorRgba(ColorRgba)
ColorReset
Icon(Int)
Font(Int)
FontReset
LineHeight(Int)
RegionBegin(Int)
RegionEnd
NewLine
}