Back

AddText

Hello World

Adds a mui text control to the layout.

txt = MUI.AddText( parent, text, width, height, options, color ) → Object

See CreateTextH1, CreateTextH2, CreateTextH3, CreateTextH4, CreateTextH5, CreateTextH6, CreateTextJumbo, CreateTextParagraph and CreateTextSecondary for full documentation on each type of mui typhography.

Example - All Typography

cfg.Light
cfg.MUI

function OnStart()
{
    lay = MUI.CreateLayout("Linear", "VCenter,FillXY")
        text = "Lorem ipsum dolor set amit"
        h1 = MUI.AddText(lay, "text", 0.8, null, "h1,Medium")
        h2 = MUI.AddText(lay, "text", 0.8, null, "h2,Bold")
        h3 = MUI.AddText(lay, "text", 0.8, null, "h3,Light")
        h4 = MUI.AddText(lay, "text", 0.8, null, "h4,Regular")
        h5 = MUI.AddText(lay, "text", 0.8, null, "h5,Medium")
        h6 = MUI.AddText(lay, "text", 0.8, null, "h6")
        p = MUI.AddText(lay, "text", 0.8, null, "paragraph,thin")
        j = MUI.AddText(lay, "text", 0.8, null, "h1,Medium")
        s = MUI.AddText(lay, "text", 0.8, null, "secondary,light")
    app.AddLayout(lay)
}
Copy All       Run      
Number
String
String:
  hexadecimal: “#rrggbb”, “#aarrggbb”
  colourName: “red”, “green”, ...
String: “DS text options with addition Thin” or “Light” or “Regular” or “Medium” or “Bold”, “h1” or “h2” or “h3” or “h4” or “h5” or “h6” or “secondary” or “jumbo” or “paragraph”
Object: MUI Layout or DS layout control