haxeui / haxeui-openfl

The OpenFL backend of the HaxeUI framework -
http://haxeui.org
MIT License
42 stars 14 forks source link

HorizontalProgress bar not added when using openfl html5 #59

Closed QazCetelic closed 1 year ago

QazCetelic commented 1 year ago

Expected Behavior

Expected layout: image

Current Behavior

Current layout: image

There are only 3 components in the DOM. The progress bar is missing entirely, it's not just invisible.

Possible Solution

-

Test app / minimal test case

Snippet to reproduce.

package ;

import haxe.ui.Toolkit;
import haxe.ui.components.HorizontalProgress;
import haxe.ui.containers.HBox;
import haxe.ui.components.Button;
import haxe.ui.HaxeUIApp;

class Main {
    public static function main() {
        Toolkit.init(); // required for OpenFL
        var app: HaxeUIApp = new HaxeUIApp();
        app.ready(() -> {
            var hbox:HBox = new HBox();
            var button:Button = new Button();
            button.text = "Button A";
            button.onClick = (e) -> {
                trace("Button A clicked");
            }
            hbox.addComponent(button);
            var button:Button = new Button();
            button.text = "Button B";
            button.onClick = (e) -> {
                trace("Button B clicked");
            }
            hbox.addComponent(button);
            var button:Button = new Button();
            button.text = "Button C";
            button.onClick = (e) -> {
                trace("Button C clicked");
            }
            hbox.addComponent(button);

            var progress:Progress = new HorizontalProgress();
            progress.pos = 0.0;
            progress.onClick = (e) -> {
                trace("Progress clicked");
                progress.pos = (progress.pos + 10.0) % 100.0;
            }
            hbox.addComponent(progress);

            app.addComponent(hbox);

            app.start();
        });
    }
}

Your Environment

QazCetelic commented 1 year ago

It seems like this issues is related to haxeui-core itself