BIG FORMATING COMMIT

This commit is contained in:
2023-07-30 15:55:22 +02:00
parent 088fce0aaa
commit 91972107eb
103 changed files with 1610 additions and 1585 deletions

View File

@@ -21,7 +21,7 @@ class RootElement implements UIElement {
this.children = children;
}
public function render(bounds: Pos):Canvas {
public function render(bounds:Pos):Canvas {
var canvas = new Canvas();
var offset = new Pos({x: 0, y: 0});
@@ -48,11 +48,11 @@ class RootElement implements UIElement {
return canvas;
}
public function setTitle(title: String) {
public function setTitle(title:String) {
this.title = title;
}
private inline function hasTitle(): Bool {
return title != "";
private inline function hasTitle():Bool {
return title != "";
}
}

View File

@@ -8,7 +8,7 @@ class TextElement implements UIElement {
private final uiEvents:UIEvents;
private final style:Style;
public function new(text:String, ?props: {?style:Style, ?uiEvents:UIEvents}) {
public function new(text:String, ?props:{?style:Style, ?uiEvents:UIEvents}) {
this.text = text;
this.uiEvents = props?.uiEvents;
this.style = props?.style ?? {fgColor: White, bgColor: Black};
@@ -26,7 +26,7 @@ class TextElement implements UIElement {
return uiEvents;
}
public function render(bounds: Pos):Canvas {
public function render(bounds:Pos):Canvas {
var canvas = new Canvas();
for (i in 0...this.text.length) {
var c = this.text.charAt(i);

View File

@@ -3,5 +3,5 @@ package lib.ui.elements;
import lib.ui.rendere.UIEventDelegate;
interface UIElement extends UIEventDelegate {
public function render(bounds: Pos):Canvas;
public function render(bounds:Pos):Canvas;
}