early-butcher-76809
02/26/2023, 6:09 PMcool-musician-79004
02/26/2023, 6:09 PMbright-gpu-74537
02/26/2023, 6:10 PMclever-yak-82528
02/26/2023, 6:52 PMbored-sandwich-20283
02/26/2023, 7:12 PMbored-sandwich-20283
02/26/2023, 7:22 PMbright-gpu-74537
02/26/2023, 7:28 PMbright-gpu-74537
02/26/2023, 7:32 PMhaxe
class CustomOpenFLComponent extends Box {
private var _sprite:Sprite;
public function new() {
super();
_sprite = new Sprite();
_sprite.graphics.clear();
_sprite.graphics.beginFill(0xff0000);
_sprite.graphics.lineStyle(1, 0x00ff00);
_sprite.graphics.drawRect(0, 0, 50, 50);
_sprite.graphics.endFill();
addChild(_sprite);
}
private override function validateComponentLayout():Bool {
var b = super.validateComponentLayout();
_sprite.width = this.width;
_sprite.height = this.height;
return b;
}
}
bright-gpu-74537
02/26/2023, 7:32 PMbright-gpu-74537
02/26/2023, 7:32 PMxml
<grid columns="3">
<button text="Button" />
<button text="Button" width="100%" />
<button text="Button" />
<button text="Button" height="100%" />
<custom-openfl-component width="100" height="100" />
<button text="Button" height="100%" />
<button text="Button" />
<button text="Button" width="100%" />
<button text="Button" />
</grid>
bored-sandwich-20283
02/26/2023, 7:33 PMbored-sandwich-20283
02/26/2023, 7:35 PMhaxe
var app = new HaxeUIApp();
Toolkit.theme = "dark";
app.ready(function() {
var mainView = new VBox();
var menubar = new MenuBar();
menubar.percentWidth = 100.0;
var menuItem = new MenuItem();
menubar.addComponent(menuItem);
mainView.addComponent(menubar);
app.addComponent(mainView);
app.start();
});
bright-gpu-74537
02/26/2023, 7:36 PMbored-sandwich-20283
02/26/2023, 7:36 PMbored-sandwich-20283
02/26/2023, 7:37 PMbright-gpu-74537
02/26/2023, 7:37 PMbright-gpu-74537
02/26/2023, 7:37 PMbored-sandwich-20283
02/26/2023, 7:43 PMWarning : no class found for component: customopenflcomponent
how do i tell haxeUI where the class is or what packages to look into ?bright-gpu-74537
02/26/2023, 7:43 PMbright-gpu-74537
02/26/2023, 7:43 PMbright-gpu-74537
02/26/2023, 7:44 PMbright-gpu-74537
02/26/2023, 7:44 PMbored-sandwich-20283
02/26/2023, 7:54 PMxml
<module id="my-stuff">
<components>
<component class="test.CustomOpenFLComponent" />
</components>
</module>
and the component (CustomOpenFLComponent) in a package called test
bit i still get no class foundbright-gpu-74537
02/26/2023, 7:56 PMbored-sandwich-20283
02/26/2023, 7:56 PMbright-gpu-74537
02/26/2023, 7:59 PMbored-sandwich-20283
02/26/2023, 8:23 PMhaxe.ui.containers.windows.Window
is it something custom ?
https://www.haxeui.org/explorer/#containers/windowsbright-gpu-74537
02/26/2023, 8:24 PMbored-sandwich-20283
02/26/2023, 8:24 PMbright-gpu-74537
02/26/2023, 8:24 PM