best-agent-85158
04/20/2022, 1:53 PMbest-agent-85158
04/20/2022, 1:53 PMbright-gpu-74537
04/20/2022, 1:54 PMbest-agent-85158
04/20/2022, 1:54 PMbest-agent-85158
04/20/2022, 1:54 PMbright-gpu-74537
04/20/2022, 1:55 PMxml
<vbox>
<my-custom-component someProp="22" />
</vbox>
is perfectly valid, and would lead to a component class MyCustomComponent with a "someProp:Int"best-agent-85158
04/20/2022, 1:56 PMbest-agent-85158
04/20/2022, 1:56 PMbright-gpu-74537
04/20/2022, 1:56 PMbright-gpu-74537
04/20/2022, 1:56 PMbright-gpu-74537
04/20/2022, 2:02 PMbright-gpu-74537
04/20/2022, 2:03 PMhaxe
@:build(...)
class LineSettingsPanel extends VBox { }
But thats if i was making it ofc :), and its defo a personal prefbest-needle-18998
04/20/2022, 4:01 PMmagnificent-crayon-8615
04/20/2022, 5:14 PMmagnificent-crayon-8615
04/20/2022, 5:50 PMhaxe
var panel = new LineSettingsPanel();
mainHaxeUIApp.addComponent(panel);
panel.homeView.hide();
at least in vscode we have autocomplete for what I've done, when calling panel.homeView and for every public property/method of the custom component and sub custom components... like Ian I make several custom components (and respective XML) for all UI representation and that makes simple/complex UIs very easy to maintainbright-gpu-74537
04/20/2022, 5:51 PMpurple-businessperson-14467
04/20/2022, 6:23 PMmagnificent-crayon-8615
04/20/2022, 6:32 PMbest-agent-85158
04/20/2022, 6:33 PMbest-agent-85158
04/20/2022, 6:33 PMbest-agent-85158
04/20/2022, 6:33 PMmagnificent-crayon-8615
04/20/2022, 6:35 PMbest-agent-85158
04/20/2022, 6:37 PMEventDispatcher.dispatch.
you can fill whatever event needed there, and it will execute certine predefined functions.
you can access everything from anywhere, because the main editor of the app is being assigned to a static variable, and the editor contains public links to every single tabbest-agent-85158
04/20/2022, 6:39 PMhaxe
class Toolbox extends ToolBoxGraphics {
//listeners & public functions
}
class ToolBoxGraphics extends Grid {
//public vars here
}hallowed-forest-58641
04/20/2022, 6:46 PMmagnificent-crayon-8615
04/20/2022, 6:47 PMbright-gpu-74537
04/20/2022, 6:49 PMbright-gpu-74537
04/20/2022, 6:50 PMbright-gpu-74537
04/20/2022, 6:50 PM