bright-gpu-74537
05/25/2022, 8:54 AMhaxe -lib heaps -lib hlsdl -cp src -hl "C:/Temp/New Project/bin/NewProject.hl" -D hot-reload -main Mainbright-gpu-74537
05/25/2022, 8:54 AMhl --hot-reload NewProject.hlbright-gpu-74537
05/25/2022, 8:54 AMbright-gpu-74537
05/25/2022, 8:54 AMbright-gpu-74537
05/25/2022, 8:55 AMpowerful-morning-89
05/25/2022, 9:01 AMinit won't get called again after hot reloading, so tf.text will not be updated.
If you put tf.text = "foo" in the update function then it should work, because update is called every frame.
In Flutter changes like that will work because of it's architecture.
Iirc every UI widget has a build function, so upon hot reload Flutter can just rebuild all the components and that way all the changes will be applied.bright-gpu-74537
05/25/2022, 9:05 AMbright-gpu-74537
05/25/2022, 9:06 AMbright-gpu-74537
05/25/2022, 9:07 AMbright-gpu-74537
05/25/2022, 9:07 AMhaxe
class Main extends hxd.App {
var tf:Text;
override function init() {
tf = new h2d.Text(hxd.res.DefaultFont.get(), s2d);
}
override function update(dt:Float):Void
{
super.update(dt);
tf.text = "Hello World 11 !";
}
static function main() {
new Main();
}
}powerful-morning-89
05/25/2022, 9:08 AMpowerful-morning-89
05/25/2022, 9:11 AMbright-gpu-74537
05/25/2022, 9:11 AMorange-yacht-88551
05/25/2022, 1:57 PMorange-yacht-88551
05/25/2022, 1:58 PMambitious-knife-25690
05/25/2022, 2:26 PMambitious-knife-25690
05/25/2022, 2:27 PMambitious-knife-25690
05/25/2022, 2:27 PMfuture-iron-61487
05/25/2022, 4:10 PMchilly-tiger-37884
05/26/2022, 4:15 PMDialogs.selectFile is not working for me in debug mode. The file select window is frozen and without buttons. It seems to work perfectly fine when I build the application and run the executablebright-gpu-74537
05/26/2022, 9:13 PMfamous-printer-83009
05/27/2022, 1:15 AMbright-gpu-74537
05/27/2022, 6:14 AMbright-gpu-74537
05/27/2022, 6:14 AMchilly-tiger-37884
05/27/2022, 6:16 AMbright-gpu-74537
05/27/2022, 6:21 AMchilly-tiger-37884
05/27/2022, 6:24 AMimport haxe.ui.containers.VBox;
import haxe.ui.containers.dialogs.Dialog.DialogButton;
import haxe.ui.containers.dialogs.Dialogs;
import haxe.ui.components.Button;
import haxe.ui.Toolkit;
class Main extends hxd.App {
override function init() {
Toolkit.init({root: s2d});
var vbox = new VBox();
s2d.addChild(vbox);
var b = new Button();
b.text = "Click me";
b.onClick = function(_) {
Dialogs.selectFile(function(btn, fileList) {
if (btn != DialogButton.CANCEL) {
trace(fileList[0].fullPath);
}
});
}
vbox.addComponent(b);
}
override function update(dt:Float) {
}
static function main() {
hxd.Res.initEmbed();
new Main();
}
}chilly-tiger-37884
05/27/2022, 6:25 AMbright-gpu-74537
05/27/2022, 6:27 AMbright-gpu-74537
05/27/2022, 6:28 AM