hallowed-ocean-84954
06/29/2022, 2:52 PMbright-gpu-74537
06/29/2022, 2:52 PMhallowed-ocean-84954
06/29/2022, 2:53 PMbright-gpu-74537
06/29/2022, 2:58 PMhallowed-ocean-84954
06/29/2022, 3:06 PMhallowed-ocean-84954
06/29/2022, 3:11 PMpowerful-morning-89
06/29/2022, 3:13 PMhallowed-ocean-84954
06/29/2022, 3:15 PMhallowed-ocean-84954
06/29/2022, 3:15 PMhallowed-ocean-84954
06/29/2022, 3:21 PMbright-gpu-74537
06/29/2022, 3:24 PMhaxelib dev and haxelib githallowed-ocean-84954
06/29/2022, 3:28 PMsilly-alligator-51979
06/29/2022, 3:35 PMbright-gpu-74537
06/29/2022, 3:39 PMbright-gpu-74537
06/29/2022, 3:39 PMbright-gpu-74537
06/29/2022, 3:48 PMsilly-alligator-51979
06/29/2022, 3:48 PMbright-gpu-74537
06/29/2022, 3:49 PMhaxe
@:build(haxe.ui.ComponentBuilder.build("assets/main-view.xml"))
class MainView extends Box {
public function new() {
super();
}
private override function onReady() {
super.ready();
setupDrop(dropTarget1, theLabel1);
setupDrop(dropTarget2, theLabel2);
setupDrop(dropTarget3, theLabel3);
setupDrop(dropTarget4, theLabel4);
}
private function setupDrop(target:Component, label:Label) {
target.window.dragAcceptFiles(true);
target.window.bind(hx.widgets.EventType.DROP_FILES, function(e:hx.widgets.Event) {
var dfe = e.convertTo(DropFilesEvent);
trace("on dropped - " + dfe.numberOfFiles);
label.text = dfe.files.join("\n");
});
}
}silly-alligator-51979
06/29/2022, 3:49 PMbright-gpu-74537
06/29/2022, 3:49 PMxml
<box style="padding: 5px;" width="800" height="600">
<grid width="100%" height="100%">
<box id="dropTarget1" width="50%" height="50%" style="background-color: #FFCCCC">
<label text="Drop Some Files" id="theLabel1" verticalAlign="center" horizontalAlign="center" style="text-align:center" />
</box>
<box id="dropTarget2" width="50%" height="50%" style="background-color: #CCFFCC">
<label text="Drop Some Files" id="theLabel2" verticalAlign="center" horizontalAlign="center" style="text-align:center" />
</box>
<box id="dropTarget3" width="50%" height="50%" style="background-color: #CCCCFF">
<label text="Drop Some Files" id="theLabel3" verticalAlign="center" horizontalAlign="center" style="text-align:center" />
</box>
<box id="dropTarget4" width="50%" height="50%" style="background-color: #FFFFCC">
<label text="Drop Some Files" id="theLabel4" verticalAlign="center" horizontalAlign="center" style="text-align:center" />
</box>
</grid>
</box>bright-gpu-74537
06/29/2022, 3:51 PMbright-gpu-74537
06/29/2022, 3:53 PMbright-gpu-74537
06/29/2022, 3:54 PMbright-gpu-74537
06/29/2022, 3:55 PMpowerful-morning-89
06/29/2022, 3:57 PMbest-agent-85158
06/29/2022, 3:58 PMpowerful-morning-89
06/29/2022, 3:59 PMbest-agent-85158
06/29/2022, 4:01 PM