CabinGame/Luxe/blocks/ui.wren
2020-08-16 15:59:43 +02:00

28 lines
No EOL
627 B
Text

import "luxe: draw" for Draw, PathStyle
import "luxe: world" for Entity, Transform, UI, UIRenderMode
import "luxe: ui/control" for Control
import "luxe: ui/panel" for UIPanel
class Ui{
static setup(app){
__ui = Entity.create(app.ui, "UI Root")
var x = 0
var y = app.width
var w = app.width
var h = app.height - app.width
UI.create(__ui, x, y, w, h, 0, app.ui_camera)
UI.set_render_mode(__ui, UIRenderMode.world)
var panel = UIPanel.create(__ui)
UIPanel.set_color(panel, [1, 0, 0, 1])
Control.set_size(panel, w, h)
//UI.commit(__ui)
}
}