#LibGDX Markup Language Templates for LibGDX Scene2D with HTML-like syntax and FreeMarker-inspired macros.
##Examples See gdx-lml-tests for example uses of all available tags and macros.
###Documentation See LibGDX forum thread, example project, tutorial and old syntax page (work in progress).
##Extensions VisUI syntax support is available through gdx-lml-vis library. Additionally to replacing standard Scene2D actors with improved VisUI widgets, it offers full support for other VisUI features - including color picker, file chooser, other new widgets, listeners and validators.
To import LML with Gradle
, add this dependency to your core project:
compile "com.github.czyzby:gdx-lml:1.4.$gdxVersion"
Currently supported LibGDX version is 1.7.2.
If you want to use LML with GWT, you have to add this module to your GdxDefinition
:
<inherits name='com.github.czyzby.lml.GdxLml' />
1.4 -> 1.5
argument
macro added. Contrary toassign
macro, this macro evaluates passed arguments. For example,assign
macro would assign@someBundleLine
to argument name, whileargument
value would convert it toActual bundle line value in .properties file.
and assign it to the argument. SeeArgumentLmlMacroTag
for more informations.- Ranges now accept bundle lines, preferences and methods. For example, now you can customize range size with i18n bundle file:
range[@start,@end]
, provided that.properties
file has numericstart
andend
lines. - Equations (available through
if
,while
andcalculate
macros) now parse bundle lines and preferences. For example,<@if @someLine < 20>
will check if bundle line mapped tosomeLine
is shorter than 20 characters in the current locale. - Equation marker. Now equations can be used pretty much anywhere, using mechanism similar to arguments. Normally, you insert parser arguments
{likeThat}
- this will look for an argument namedlikeThat
and replace the braces block with its value (ornull
). To use equation instead, add=
character at the beginning. For example,{=3+5}
will replace the block with8
. Bundle lines, preferences and methods are also supported by these equations. Equation marker aims to be a simplified alternative tocalculate
macro. As usual: to change equation marker, extendDefaultLmlSyntax
class and override appropriate method. See new equations example ingdx-lml-tests
.
1.3 -> 1.4
PooledList
is now used instead ofLinkedList
, which should slightly speed up the parsing (as in: limit its garbage collection) thanks to cached nodes and iterators.
1.2 -> 1.3
ButtonGroup
support through specializedTable
extension:ButtonTable
.<buttonTable>
tag works like a regular table (can have any children), except it adds all its directButton
-extending children to an internalButtonGroup
instance, validating their checked status. This allows to easily build groups of widgets with min and max amounts of checked buttons.image
(withicon
alias) attribute available forImageButton
andImageTextButton
. These attributes replaceimageUp
drawable in buttons' styles: if this is the only drawable in the style, it will be always drawn on the button. You can just use a single style without any icons and manage buttons' images through these LML attributes.
Older change logs are available in CHANGES.md
file.