From ef3ba89f92885abb7c5bbd5f5015cb7c2c2e9d7c Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Sat, 22 Dec 2018 17:23:56 -0600 Subject: [PATCH] Haxe4 compat --- haxe/ui/backend/ComponentBase.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/haxe/ui/backend/ComponentBase.hx b/haxe/ui/backend/ComponentBase.hx index 22bd52c..6b544d4 100644 --- a/haxe/ui/backend/ComponentBase.hx +++ b/haxe/ui/backend/ComponentBase.hx @@ -25,11 +25,13 @@ class ComponentBase extends FlxSpriteGroup implements IComponentBase { var tf:TextDisplay; // text var input:TextInput; - var asComponent:Component = cast this; + var asComponent:Component; public function new() { super(); + asComponent = cast this; + scrollFactor.set(0, 0); // ui doesn't scroll by default surface = new FlxSprite();