https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • o

    orange-van-60470

    02/26/2023, 1:56 PM
    hxcpp seems to generate file if not already
  • o

    orange-van-60470

    02/26/2023, 1:59 PM
    the new line stuff is not properly integrated yet... and I have not uploaded the parts that use trianglegml... so far have about 10-15 of the render definitions tidied up, so good portion but clean lines has been bugging me
  • o

    orange-van-60470

    02/26/2023, 2:00 PM
    i need to look properly at endian as that may halt native
  • e

    early-butcher-76809

    02/26/2023, 2:07 PM
    @bright-gpu-74537, is there an existing way to navigate through focusable HaxeUi components in a layout ? Changing the focus with a given direction ? Let's say I wanna navigate with the keyboard or a controller.
  • b

    bright-gpu-74537

    02/26/2023, 2:09 PM
    so, this is all very wip.. there is an "ActionManager"... this has two "modes": using tabs, or using arrow keys (dpad), eventually the action input source will be configurable to allow navigation via controller, remote, etc... but its not there yet - you should be able to navigate via keyboard though, now... can you not?
  • b

    bright-gpu-74537

    02/26/2023, 2:09 PM
    https://github.com/haxeui/haxeui-core/tree/master/haxe/ui/actions
  • e

    early-butcher-76809

    02/26/2023, 2:11 PM
    I can't but it may be because of my convoluted layout ^^'
  • e

    early-butcher-76809

    02/26/2023, 2:12 PM
    At least I know where to look, now. Thank you !
  • b

    bright-gpu-74537

    02/26/2023, 2:12 PM
    i doubt it... it shouldnt matter... maybe global key presses arent supported in haxeui-heaps currently
  • e

    early-butcher-76809

    02/26/2023, 2:13 PM
    Oh, right, it may be the input catching that doesn't work. Gonna take a look
  • b

    bright-gpu-74537

    02/26/2023, 2:13 PM
    nope, not supported (yet): https://github.com/haxeui/haxeui-heaps/blob/master/haxe/ui/backend/ScreenImpl.hx#L186-L206
  • b

    bright-gpu-74537

    02/26/2023, 2:13 PM
    ill make a note to look into it
  • e

    early-butcher-76809

    02/26/2023, 2:13 PM
    Oh, you're right, I already read that function some time ago !
  • b

    bright-gpu-74537

    02/26/2023, 2:14 PM
    suffice to say, like most things haxeui, once a few functions are implemented (in this case mapping heaps keyboard events to haxeui events globally) full keyboard navigation should "just work"
  • e

    early-butcher-76809

    02/26/2023, 2:14 PM
    Well, if you want help, I can look into it, at some point !
  • e

    early-butcher-76809

    02/26/2023, 2:15 PM
    I'm currently building my UI and I was wondering about that. I don't need it right away but I can do stuff when I will
  • b

    bright-gpu-74537

    02/26/2023, 2:15 PM
    well, the most useful thing that would save me time, would just some example code (in heaps) of capturing up / down / press keyboard events globally (ie, not in an interactive), the mapping itself after that is super simple... its the framework specific stuff that always requires a little investigation (since im an expert in none of them 🙂 )
  • b

    bumpy-engineer-49082

    02/26/2023, 2:17 PM
    Doesn't work with image or i have no idea how to implement it.
  • b

    bright-gpu-74537

    02/26/2023, 2:18 PM
    huh?
  • b

    bumpy-engineer-49082

    02/26/2023, 2:23 PM
    this one.
  • b

    bright-gpu-74537

    02/26/2023, 2:24 PM
    which backend are you using?
  • b

    bumpy-engineer-49082

    02/26/2023, 2:27 PM
    Kha.
  • b

    bright-gpu-74537

    02/26/2023, 2:28 PM
    ah, haxeui-kha doesnt currently have a canvas implementation - however, i also noticed this recently (since ive got a fairly big chunk of updates coming for haxeui-kha), so it will probably get sorted sooner rather than later
  • b

    bumpy-engineer-49082

    02/26/2023, 2:29 PM
    aaaand it doesn't work in builder.
  • b

    bright-gpu-74537

    02/26/2023, 2:29 PM
    i dont know what your layout is, or why it has a url in it, but yeah, it looks like you are thinking canvas is something it isnt
  • b

    bright-gpu-74537

    02/26/2023, 2:29 PM
    paste the link
  • r

    refined-greece-48002

    02/26/2023, 2:35 PM
    For global keyboard events in Heaps, I'm doing:
    Copy code
    haxe
    Window.getInstance().addEventTarget(handleKeys);
    where handleKeys is
    e:hxd.Event->Void
    From withing there I can switch on
    e.kind
    , which is a
    hxd.Event.EventKind
    enum, to respond to its values
    EKeyDown
    and
    EKeyUp
    It also has
    e.keyCode
    which looks to be the same as haxeui version. ie
    Copy code
    haxe
    function handleKeys(e:Event){
            switch(e.kind){
                case EKeyDown:
                  //switch on e.keyCode
                case EKeyUp:
                  //switch on e.keyCode
                default:
            }
    }
  • b

    bright-gpu-74537

    02/26/2023, 2:36 PM
    perfect... thanks! 🙂
  • e

    early-butcher-76809

    02/26/2023, 2:37 PM
    You just beat me to it !
  • e

    early-butcher-76809

    02/26/2023, 2:37 PM
    The same way you use it there :
1...153915401541...1687Latest