haxeui / haxeui-heaps

MIT License
31 stars 12 forks source link

textfield doesnt allow you to enter text #20

Closed hoseyjoe closed 2 years ago

hoseyjoe commented 3 years ago

It looks like textfield gets focus but doesnt accept any input
test.zip

hoseyjoe commented 3 years ago

I dont know if it is helpful or not but the Hand cursor doesnt go away when rolling over textfield. I would expect the "I" cursor. Anyway the textfiled appears like abutton

hoseyjoe commented 3 years ago

did not mean to close

hoseyjoe commented 3 years ago

well I dug into it a little. It seems it is easier than thought. Just add the createText override on haxe\ui\backend\TextInputImpl.hx

hand cursor is still there but there it is. Not sure if it should get default font or the textfield font or....but it works

package haxe.ui.backend;

class TextInputImpl extends TextDisplayImpl {
    public function new() {
        super();
    }

    override private function createText():h2d.TextInput {
        return new h2d.TextInput(hxd.res.DefaultFont.get());
    }
}
hoseyjoe commented 2 years ago

you can now enter text