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

    fast-rain-20339

    07/09/2020, 11:30 AM
    It does a pretty good UX job in terms of mirroring the big OS's, I played with it a couple of years ago 🙂
  • f

    fast-rain-20339

    07/10/2020, 11:48 AM
    I'm trying to replicate that colour picker component you shared awhile ago Ian and running into some obstacles. screenX and screenY seem to have the wrong values, don't update when the window resizes, and when I do draw something, it appears under the UI, rather than on top. Any pointers?
  • b

    bright-gpu-74537

    07/10/2020, 12:48 PM
    any chance to knock up a minimal example? Hard to guess whats going on without some code
  • f

    fast-rain-20339

    07/10/2020, 12:50 PM
    Sure 👍 I'm really doing exactly the same code as your colour picker, but my colour picker is embedded in the frame on the right hand side. Anyway, I'll try and make one 🙂
  • f

    fast-rain-20339

    07/10/2020, 1:04 PM
    Ah. Persisted for a bit before working on a testcase and made some discoveries. - It renders on top of the existing UI when batching is turned off. - Width and height are 0 when the component is instanciated, I should instead generate the image on
    READY
    -
    ScreenX
    and
    ScreenY
    are correct, but do not update on resize. So, mostly fixed (though disabling batching might be something to avoid). I'm confused about the resize issue though, because obviously all of my other components happily follow the window size change.
  • b

    bright-gpu-74537

    07/10/2020, 1:05 PM
    still might be worth having a simple test case, i wrote that previous component in like 5 mins, so its likely it doesnt honour certain things very well (like the batching for example - i seem to remember thinking to myself "this is gonna screw up batching")
  • f

    fast-rain-20339

    07/10/2020, 1:06 PM
    Aha alrighty 🙂
  • b

    bright-gpu-74537

    07/10/2020, 1:06 PM
    if we have that brush component in a frame in a blank haxeui-kha app we can look at a) make it work better in isolation and b) possibly make changes to haxeui-kha to better facilitate this type of stuff
  • f

    fast-rain-20339

    07/10/2020, 1:07 PM
    Awesome. Plus, we might get a sweet colour picker app 😛
  • b

    bright-gpu-74537

    07/10/2020, 1:07 PM
    i kinda remember thinking "the componentimpl in haxeui-kha should expose a 'renderMe' function"
  • b

    bright-gpu-74537

    07/10/2020, 1:07 PM
    (obviously not called renderMe 😄 )
  • b

    bright-gpu-74537

    07/10/2020, 1:08 PM
    the only issue with your colour picker is that its not "pure" haxeui, and therefore wont make it into haxeui-core
  • f

    fast-rain-20339

    07/10/2020, 1:09 PM
    Oh yeah I didn't expect it to be, implementations would differ wildly
  • b

    bright-gpu-74537

    07/10/2020, 1:09 PM
    however, when haxeui-core gets a canvas component, then things like that would be possible across all backends
  • b

    bright-gpu-74537

    07/10/2020, 1:10 PM
    https://community.haxeui.org/t/canvas-component/99/23
  • b

    bright-gpu-74537

    07/10/2020, 1:10 PM
    alot of that isnt directly related though
  • b

    bright-gpu-74537

    07/10/2020, 1:10 PM
    https://github.com/haxeui/haxeui-core/issues/108#issuecomment-290167026
  • b

    bright-gpu-74537

    07/10/2020, 1:10 PM
    that is my example impl of how it will work
  • f

    fast-rain-20339

    07/10/2020, 1:10 PM
    Pretty cool stuff. Personally, I can't see myself using a canvas component, because I may as well use the API of my chosen backend directly, but I can see how it could be helpful for beginners at least, and people who don't care about the backends.
  • b

    bright-gpu-74537

    07/10/2020, 1:11 PM
    well, or for things like that colour picker
  • f

    fast-rain-20339

    07/10/2020, 1:11 PM
    Indeed.
  • b

    bright-gpu-74537

    07/10/2020, 1:11 PM
    that is the point of it...
  • b

    bright-gpu-74537

    07/10/2020, 1:12 PM
    there are times when you want to draw to a component, but you dont want to go through the backend directly... you could ofc #if kha, #if openfl, etc... but that makes things messy, and this is the entire point of the abstract of haxeui
  • f

    fast-rain-20339

    07/10/2020, 1:12 PM
    Ah I see. Yeah, cool stuff. I just saw
    haxeui-core custom-component <classname>
    , is that functional? I'm getting
    Invalid field access: length
  • f

    fast-rain-20339

    07/10/2020, 1:13 PM
    (The CLI thing you've got)
  • b

    bright-gpu-74537

    07/10/2020, 1:13 PM
    i think it was at some point... i never really used it in the end... it was so quick to manually make one (two files) i never kept up with it
  • f

    fast-rain-20339

    07/10/2020, 1:13 PM
    Aha yeah fair enough, it is easy to make components 😄
  • b

    bright-gpu-74537

    07/10/2020, 1:14 PM
    yeah, exactly, i think it was one of the 4am decisions: "wouldnt it be cool if ... ... ... ... ", next day "nope, not really"
  • b

    bright-gpu-74537

    07/10/2020, 1:14 PM
    😄
  • f

    fast-rain-20339

    07/10/2020, 1:14 PM
    Yep, had those myself 😆 (And at 1am. I can't imagine myself at 4 crikey)
1...310311312...1687Latest