Displaying text
So let's output some text in our GUI. We do it like this:
Here and in the examples below, we're saving this code as .kuiml with the same base name as our DSP script file. We're using LM Skin, but these examples should work in the default skin as well.
We can also place several TEXT elements in a single line like this:
TEXT element inherits text/font properties from the CELL, so you can check it out to see what attributes for the text are available.
The ROW element is a shortcut for <CELL layout_type="row">. There are three layout types: column (default), row, and layer_stack (which put elements one over another like layers). Every CELL element is in one of these modes.
SKIN is like a CELL element also, so instead of adding ROW in our example we could just add layout_type="row" to the SKIN. But let's make an example with a layer_stack instead:
Note about multiline text
In official KUIML examples, you can find attributes like "multiline" or "word_break", supposed to make your text multilined. However, they were deprecated along the way, and don't work in modern KUIML.
For multilined text, we have to use some tricks that we hopefully discuss later.