https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • oh, i thought pokemon for some reason
    b

    bright-gpu-74537

    04/02/2023, 4:49 PM
    oh, i thought pokemon for some reason
  • so big text gets very cumbersome to input
    i

    icy-zebra-52882

    04/02/2023, 4:49 PM
    so big text gets very cumbersome to input
  • ¯\_(ツ)_/¯
    b

    bright-gpu-74537

    04/02/2023, 4:49 PM
    ¯\_(ツ)_/¯
  • also the unicode font it uses for non-latin script is different logic but I haven't added that yet 😓
    i

    icy-zebra-52882

    04/02/2023, 4:50 PM
    also the unicode font it uses for non-latin script is different logic but I haven't added that yet 😓
  • for now, it's enough that one works
    i

    icy-zebra-52882

    04/02/2023, 4:50 PM
    for now, it's enough that one works
  • one last notice, definitely not expecting a fix soon since it's nice out 😎 updating strings with LocaleManager works once via `instance.refreshAll()`, but doesn't do anything after the first time (in haxeui-hxwidgets)
    i

    icy-zebra-52882

    04/02/2023, 5:26 PM
    one last notice, definitely not expecting a fix soon since it's nice out 😎 updating strings with LocaleManager works once via
    instance.refreshAll()
    , but doesn't do anything after the first time (in haxeui-hxwidgets)
  • in fact it seems to stop any of my callbacks working after changing the language
    i

    icy-zebra-52882

    04/02/2023, 5:30 PM
    in fact it seems to stop any of my callbacks working after changing the language
  • ah probably legacy reasons
    i

    icy-zebra-52882

    04/02/2023, 5:39 PM
    ah probably legacy reasons
  • Whenever I run my Kha program I'm greeted with a few warnings: ``` haxe/ui/core/Screen.hx:271: WARNING: Screen event "keydown" not supported haxe/ui/core/Screen.hx:271: WARNING: Screen event "keyup" not supported haxe/ui/core/Screen.hx:271: WARNING: Screen event "keydown" not supported ``` Since I've got DCE on and am not using those events in my code, those are coming from haxeui core. As far as I can tell, those are related to - Pressing "tab" to iterate over selectable components - Pressing "enter" to submit textfields - `ActionManager`, which I think is supposed to help with keybinding and non-keyboard inputs? I also ran into similar warnings when trying to set up RMB-driven interaction. None of these are critical for where I'm at now, but if I were to dig into the Kha backend in an effort to clean up my warnings, is there a good "reference" implementation I could be mimicking for `ScreenImpl`/`KeyboardHelper`/`MouseHelper`?
    f

    few-pizza-8232

    04/02/2023, 7:55 PM
    Whenever I run my Kha program I'm greeted with a few warnings:
    Copy code
    haxe/ui/core/Screen.hx:271: WARNING: Screen event "keydown" not supported
    haxe/ui/core/Screen.hx:271: WARNING: Screen event "keyup" not supported
    haxe/ui/core/Screen.hx:271: WARNING: Screen event "keydown" not supported
    Since I've got DCE on and am not using those events in my code, those are coming from haxeui core. As far as I can tell, those are related to - Pressing "tab" to iterate over selectable components - Pressing "enter" to submit textfields -
    ActionManager
    , which I think is supposed to help with keybinding and non-keyboard inputs? I also ran into similar warnings when trying to set up RMB-driven interaction. None of these are critical for where I'm at now, but if I were to dig into the Kha backend in an effort to clean up my warnings, is there a good "reference" implementation I could be mimicking for `ScreenImpl`/`KeyboardHelper`/`MouseHelper`?
  • So you're saying the "reference implementation" is in the same codebase, I just need to get the screen to do what components are already doing, more or less
    f

    few-pizza-8232

    04/02/2023, 8:19 PM
    So you're saying the "reference implementation" is in the same codebase, I just need to get the screen to do what components are already doing, more or less
  • looking at the code anyway it seems to be implemented "fully" in componentimpl
    a

    ambitious-knife-25690

    04/02/2023, 8:22 PM
    looking at the code anyway it seems to be implemented "fully" in componentimpl
  • Wonder if that's handling the cases I mentioned above then? I'll take a closer look when I actually get into this
    f

    few-pizza-8232

    04/02/2023, 8:23 PM
    Wonder if that's handling the cases I mentioned above then? I'll take a closer look when I actually get into this
  • yeah, there's 2 places to handle keyboard input
    a

    ambitious-knife-25690

    04/02/2023, 8:24 PM
    yeah, there's 2 places to handle keyboard input
  • component handles it at a component level and screen handles it at a global level
    a

    ambitious-knife-25690

    04/02/2023, 8:24 PM
    component handles it at a component level and screen handles it at a global level
  • so i think screen would probably handle something like tab indexing but that's a guess as i haven't looked at how core does something like that
    a

    ambitious-knife-25690

    04/02/2023, 8:25 PM
    so i think screen would probably handle something like tab indexing but that's a guess as i haven't looked at how core does something like that
  • Yeah makes sense
    f

    few-pizza-8232

    04/02/2023, 8:25 PM
    Yeah makes sense
  • This sounds like a mostly straightforward thing to line up. I'll give it a shot sometime and PR if I think it's stable enough for more general use
    f

    few-pizza-8232

    04/02/2023, 8:27 PM
    This sounds like a mostly straightforward thing to line up. I'll give it a shot sometime and PR if I think it's stable enough for more general use
  • Thanks for pointing that out
    f

    few-pizza-8232

    04/02/2023, 8:27 PM
    Thanks for pointing that out
  • what backend?
    b

    bright-gpu-74537

    04/02/2023, 8:54 PM
    what backend?
  • just HaxeUI-Kha - I know it's "fine" but I'd like to clear up my debug-warning list at some point
    f

    few-pizza-8232

    04/02/2023, 8:55 PM
    just HaxeUI-Kha - I know it's "fine" but I'd like to clear up my debug-warning list at some point
  • kha, gotcha, that sounds very easy to fix since effectly all keyboard inputs are global
    b

    bright-gpu-74537

    04/02/2023, 8:56 PM
    kha, gotcha, that sounds very easy to fix since effectly all keyboard inputs are global
  • tbh, its would just clear up warnings, it would actually add functionality (like being able to tab between fields, or use the keyboard in general for navigation)
    b

    bright-gpu-74537

    04/02/2023, 8:57 PM
    tbh, its would just clear up warnings, it would actually add functionality (like being able to tab between fields, or use the keyboard in general for navigation)
  • iirc kha is so simple here im surprised it isnt already hooked up - oversight on my part ill assume
    b

    bright-gpu-74537

    04/02/2023, 8:58 PM
    iirc kha is so simple here im surprised it isnt already hooked up - oversight on my part ill assume
  • Oh, for sure, the warnings are just the motivating force on my end. That, and realizing that I couldn't track right-mouse-up screenwide
    f

    few-pizza-8232

    04/02/2023, 8:59 PM
    Oh, for sure, the warnings are just the motivating force on my end. That, and realizing that I couldn't track right-mouse-up screenwide
  • https://github.com/haxeui/haxeui-kha/blob/master/haxe/ui/backend/ScreenImpl.hx#L195-L202 - yup no keyboard events
    b

    bright-gpu-74537

    04/02/2023, 8:59 PM
    https://github.com/haxeui/haxeui-kha/blob/master/haxe/ui/backend/ScreenImpl.hx#L195-L202 - yup no keyboard events
  • Right, I figure NotBilly's suggestion to mimic `ComponentImpl` would involve extending that and `ScreenImpl.mapEvent()`
    f

    few-pizza-8232

    04/02/2023, 9:02 PM
    Right, I figure NotBilly's suggestion to mimic
    ComponentImpl
    would involve extending that and
    ScreenImpl.mapEvent()
  • Is `ActionManager` intended for keybinding to HaxeUI events? Or did I get the wrong impression from my skim-through
    f

    few-pizza-8232

    04/02/2023, 9:04 PM
    Is
    ActionManager
    intended for keybinding to HaxeUI events? Or did I get the wrong impression from my skim-through
  • effectively yeah, all you really need to do is map keyboard events from kha and let haveui know when they happen, basically: haxeui will, at some point, say "can you let me know when a key is pressed", it will do this by asking Screen (ScreenImpl) to map a keyboard event. All the screenimpl has to do is honour that
    b

    bright-gpu-74537

    04/02/2023, 9:04 PM
    effectively yeah, all you really need to do is map keyboard events from kha and let haveui know when they happen, basically: haxeui will, at some point, say "can you let me know when a key is pressed", it will do this by asking Screen (ScreenImpl) to map a keyboard event. All the screenimpl has to do is honour that
  • all the backend needs to do is supply the events (and keycodes)
    b

    bright-gpu-74537

    04/02/2023, 9:05 PM
    all the backend needs to do is supply the events (and keycodes)
  • Great
    f

    few-pizza-8232

    04/02/2023, 9:05 PM
    Great
1...161516161617...1687Latest