BIG FORMATING COMMIT
This commit is contained in:
@@ -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 != "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user