early-butcher-76809
02/08/2023, 1:53 PMrefined-greece-48002
02/08/2023, 1:53 PMbright-gpu-74537
02/08/2023, 1:53 PMearly-butcher-76809
02/08/2023, 2:06 PMearly-butcher-76809
02/08/2023, 2:07 PMbright-gpu-74537
02/08/2023, 2:57 PMbright-gpu-74537
02/08/2023, 2:57 PMearly-butcher-76809
02/08/2023, 2:57 PMbright-gpu-74537
02/08/2023, 2:58 PMbillowy-easter-22196
02/08/2023, 2:59 PMhaxe
camera.scaleX += (isScrollingIn ? 1 : -1) * 0.01;
camera.scaleY += (isScrollingIn ? 1 : -1) * 0.01;
after zoom, haxeui components seems to be screwed. text is gone but interactive elements from in in a static absolute positionsbillowy-easter-22196
02/08/2023, 3:01 PMbillowy-easter-22196
02/08/2023, 3:02 PMToolkit.scaleX = s2d.interactiveCamera.scaleX;
Toolkit.scaleY = s2d.interactiveCamera.scaleY;
this zooms components but they like still broken after thisbillowy-easter-22196
02/08/2023, 3:06 PMambitious-knife-25690
02/08/2023, 3:08 PMbillowy-easter-22196
02/08/2023, 3:09 PMfull-journalist-82607
02/08/2023, 3:39 PMearly-butcher-76809
02/08/2023, 3:39 PMfull-journalist-82607
02/08/2023, 3:40 PMbumpy-engineer-49082
02/08/2023, 3:44 PMbright-gpu-74537
02/08/2023, 3:47 PMambitious-knife-25690
02/08/2023, 3:49 PMambitious-knife-25690
02/08/2023, 3:49 PMbright-gpu-74537
02/08/2023, 3:50 PMclass Main {
static function update():Void {}
static function render(framebuffers:Array<Framebuffer>):Void {
var g = framebuffers[0].g2;
g.begin(true, 0xFFFFFFFF);
Screen.instance.renderTo(g);
g.end();
}
public static function main() {
kha.System.start({}, function(_) {
kha.Assets.loadEverything(function() {
haxe.ui.Toolkit.init();
final ui = haxe.ui.ComponentBuilder.fromFile("main-view.xml");
haxe.ui.core.Screen.instance.addComponent(ui);
System.start({title: "Project", width: 1024, height: 768}, function(_) {
// Just loading everything is ok for small projects
Assets.loadEverything(function() {
// Avoid passing update/render directly,
// so replacing them via code injection works
Scheduler.addTimeTask(function() {
update();
}, 0, 1 / 60);
System.notifyOnFrames(render);
});
});
});
});
}
}
bright-gpu-74537
02/08/2023, 3:55 PMbright-gpu-74537
02/08/2023, 3:55 PMclass Main {
static function update():Void {}
static function render(framebuffers:Array<Framebuffer>):Void {
var g = framebuffers[0].g2;
g.begin(true, 0xFFFFFFFF);
Screen.instance.renderTo(g);
g.end();
}
public static function main() {
kha.System.start({}, function(_) {
kha.Assets.loadEverything(function() {
haxe.ui.Toolkit.init();
System.start({title: "Project", width: 1024, height: 768}, function(_) {
// Just loading everything is ok for small projects
final ui = haxe.ui.ComponentBuilder.fromFile("main-view.xml");
haxe.ui.core.Screen.instance.addComponent(ui);
Assets.loadEverything(function() {
// Avoid passing update/render directly,
// so replacing them via code injection works
Scheduler.addTimeTask(function() {
update();
}, 0, 1 / 60);
System.notifyOnFrames(render);
});
});
});
});
}
}
bumpy-engineer-49082
02/08/2023, 4:27 PMicy-zebra-52882
02/09/2023, 1:04 PMselectedIndex
via code update the UI and call any onChange
callbacks?icy-zebra-52882
02/09/2023, 1:04 PMhaxe
// Pick first option for reaction dropdown if none has been selected
reactionDropdown.selectedIndex = (reactionDropdown.value == -1) ? 0 : reactionDropdown.selectedIndex;
var selectedReaction = reactionDropdown.value;
icy-zebra-52882
02/09/2023, 1:07 PMicy-zebra-52882
02/09/2023, 1:07 PMselectedIndex
isn't actually changing the value at all