haxeui / haxeui-nme

The NME backend of the HaxeUI framework -
http://haxeui.org
MIT License
4 stars 6 forks source link

Fix for NME target #19

Closed hoseyjoe closed 2 months ago

hoseyjoe commented 4 years ago

cant compile currently need to add return types. if you need a project: HaxeUITest.zip

haxe/ui/backend/ScreenImpl.hx:67: lines 67-73 : Field addComponent overrides parent class with different or incomplete type

Fix is to add
return component;

...
public override function addComponent(component:Component) {
        component.scaleX = Toolkit.scaleX;
        component.scaleY = Toolkit.scaleY;
        _topLevelComponents.push(component);
        container.addChild(component);
        onContainerResize(null);
        return component;
    }

    public override function removeComponent(component:Component) {
        _topLevelComponents.remove(component);
        container.removeChild(component);
        return component;
    }
...
hoseyjoe commented 2 months ago

This is working now