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

    bright-gpu-74537

    08/09/2022, 7:56 PM
    Haxe Compiler 4.1.5
  • l

    loud-salesclerk-7438

    08/09/2022, 7:58 PM
    I haven't tried old Haxe versions. I mostly test nightly and would recommend at least 4.2.5 (although I haven't tested 4.2.5 either).
  • b

    bright-gpu-74537

    08/09/2022, 7:59 PM
    hmmm, ill update at some point - though im not going to do that now... likely something will go wrong 😄 Isnt it a little bit of a limitation not supporting slightly older versions of haxe? 🤔
  • l

    loud-salesclerk-7438

    08/09/2022, 8:03 PM
    that limitations is simply due to me trying to keep things small, there is probably no reason why it wouldn't work with old Haxe. I just didn't have the time to actually do that, since the lib is still in very early stages and more of a proof of concept.
  • l

    loud-salesclerk-7438

    08/09/2022, 8:05 PM
    the lime mouse event just uses x and y values, so no component needed, and it will properly handle visibility. but I have no idea what component actually received that event. that's what I rely on
    findComponentUnderPoint
    for. so e.g. my testcase says find a button with id
    mybutton
    and then click on that button. if I just take x/y center-point of mybutton and send a lime event, then I have no way of knowing if that click hits. so finding out if the component on which a click should happen actually received that event is part of the protocol. a click is either a success or a failure and the testcase can deal with success or failure. sometimes failure is expected, for example when a button is underneath a modal window.
  • b

    bright-gpu-74537

    08/09/2022, 8:07 PM
    right, i see and you get back
    ["modal-background", "main-view", "hbox", "button"]
    for that call, where as in this specific case
    ["main-view", "hbox", "button"]
    is really waht you are after?
  • b

    bright-gpu-74537

    08/09/2022, 8:08 PM
    or is the button under the modal background?
  • l

    loud-salesclerk-7438

    08/09/2022, 8:08 PM
    the button is under the modal window, so technically it should not show up at all
  • b

    bright-gpu-74537

    08/09/2022, 8:09 PM
    well, i think it should show up for the getComponentsUnderPoint... haxeui is just telling you what components are under that point... not if they are obscured, partial, totally, alpha'd out etc
  • l

    loud-salesclerk-7438

    08/09/2022, 8:11 PM
    well, I'm speaking from the view point of my tests of course. so yeah the function is not limited to interactable components. and should list all of them, but the order is wrong to be easily usable
  • b

    bright-gpu-74537

    08/09/2022, 8:13 PM
    so, i still dont think im following: 1. there is a button in a vbox (button id = "button1") 2. you find the center point, and call getComponentsUnderPoint... you get back: ["vbox", "button1"] 3. button1 is the last item in the array (top most)... all good... click worked 4. this click brings up a dialog (with a modal back ground) 5. you try to click button1 again 6. find the center point call getComponentsUnderPoint, now you get back: ["vbox", "button1", "modal-overlay", "dialog", ... ... ... ] 7. button1 isnt the last (topmost) item... click failed
  • b

    bright-gpu-74537

    08/09/2022, 8:14 PM
    am i missing a step, or what the actual behaviour is?
  • l

    loud-salesclerk-7438

    08/09/2022, 8:15 PM
    button is still last item, "modal-background" is first item in list, because it is from rootComponent #2 and rootComponent traversal starts from the back
  • b

    bright-gpu-74537

    08/09/2022, 8:15 PM
    oh
  • b

    bright-gpu-74537

    08/09/2022, 8:15 PM
    so that sounds like a bug then
  • l

    loud-salesclerk-7438

    08/09/2022, 8:17 PM
    I just took a look and I'm currently using some
    obj is Type
    and some modul level fields, which makes it not compatible with anything below 4.2. but that should be easily fixable
  • b

    bright-gpu-74537

    08/09/2022, 8:18 PM
    i use obj is Type also, but i use (obj is Type)... ie,
    if ((obj is Type))
    - not as nice, but works on all haxe versions
  • l

    loud-salesclerk-7438

    08/09/2022, 8:21 PM
    well mine are missing the second parens. so that only works with newer versions (don't know when that was changed)
  • b

    bright-gpu-74537

    08/09/2022, 8:27 PM
    yeah, this defo seems like wrong behaviour
  • b

    bright-gpu-74537

    08/09/2022, 8:28 PM
    i explicitly reverse the root components
  • b

    bright-gpu-74537

    08/09/2022, 8:28 PM
    Copy code
    var copy = rootComponents.copy();
    copy.reverse();
  • b

    bright-gpu-74537

    08/09/2022, 8:28 PM
    i wonder why - or maybe there isnt a reason
  • b

    bright-gpu-74537

    08/09/2022, 8:29 PM
    this certainly seems alot more correct
  • l

    loud-salesclerk-7438

    08/09/2022, 8:37 PM
    I guess reverse was meant to make sure that the element on top comes first, but the way it traverses childs doesn't align with that
  • b

    bright-gpu-74537

    08/09/2022, 8:39 PM
    hmmm, dunno... feels like i added it for a reason... but whatever reason it was, it wasnt a good one, since - exactly as you are saying - the list that comes out of find under point isnt representative of whats on screen
  • l

    loud-salesclerk-7438

    08/09/2022, 8:42 PM
    yeah that's what I figured. I mean I fund a way to make it usable for what I need, but ultimately it should give some more usable results
  • l

    loud-salesclerk-7438

    08/09/2022, 8:42 PM
    btw. I've updated haxeium to run with 4.1.5
  • b

    bright-gpu-74537

    08/09/2022, 8:42 PM
    OK, fixed - if it was there for some type of reason, then it was certainly the wrong fix from the get go
  • b

    bright-gpu-74537

    08/09/2022, 8:43 PM
    i was going to just comment it out... but its just not valid... for whatever reason it was put there for
  • b

    bright-gpu-74537

    08/09/2022, 8:48 PM
    ... well, i cant figure it out - ive run the component explorer with this change and everything seems perfectly fine...
1...120412051206...1687Latest