added styles to TextElement

This commit is contained in:
2023-07-11 13:17:33 +02:00
parent 8683eaf17a
commit dfaabea00d
4 changed files with 19 additions and 9 deletions

View File

@@ -41,11 +41,11 @@ class PFClient implements Process {
var childre: Array<UIElement> = [
new TextElement('Acc: ${acc}'),
new TextElement('Pos: X:${pos.x} Y:${pos.y} Z:${pos.z}'),
new TextElement('UPDATE', { onClick: () -> {
new TextElement('UPDATE', { style: {bgColor: Gray}, uiEvents: {onClick: () -> {
kernel.gps.GPS.instance.locate().handle((pos) ->{
this.requestRender();
});
}}),
}}}),
];
this.root.setChildren(childre);