diff --git a/umka/ui.um b/umka/ui.um index 7299b22e..9f881be1 100644 --- a/umka/ui.um +++ b/umka/ui.um @@ -653,6 +653,7 @@ type TextBox* = struct { //~~fn TextBox.clear // Clears the textbox fn (this: ^TextBox) clear*() { +//~~ this.buffer = "" this.cursor = 0 } @@ -839,7 +840,10 @@ fn getDefaultStyle*(): Style { color: 0x888888ff } } } +//~~fn mk +// Creates a GUI instance. fn mk*(r: rect.Rect, s: Style): Gui { +//~~ gui := Gui{} gui.pushStyle(s) gui.container = []Container{ Stack{ dm: r } }