Skip to content

Rendering

Mistium edited this page Sep 13, 2024 · 4 revisions

UI Components

rect

You can create a basic rectangle using the following syntax

rect(width,height,radius)

Style Parameters

border_color     (hex)
border_weight    (number)
fill_color       (hex)
filled           (bool)

text

Render a text element.

text(txt,size)

Style Parameters

font             (string)
weight           (number)

Styling any Ui component

Using the style command, you can set any style parameter for elements

style (>rect) {
  border_color = #fff;
  border_weight = 5;
  fill = true;
  /* sets the style for all rectangles */
}

style (>rect ?hover) {
  /* sets the style for any rectangle that's being hovered
  ? uses a variable that will be checked when the element is rendered to see whether to use this styling too */
}

style (class.) {
  /* style a specific class */
}

class.rect(100,100,10);
Clone this wiki locally