https://linen.dev logo
Join Discord
Powered by
# ceramic
  • f

    faint-toothbrush-51643

    03/01/2023, 1:16 AM
    > touchable:Bool = true > > Set to false to make this visual (and all of its children) not touchable
  • a

    ambitious-knife-25690

    03/01/2023, 1:16 AM
    but i want it to be touchable? 🤔
  • b

    billowy-waiter-28954

    03/01/2023, 9:27 AM
    no, if you destroy an object you can't use it anymore. If it's a visual, you remove it from its parent and set active = false, then you recycle it. Then when you get a reused object from the pool, you do the opposite
  • b

    billowy-waiter-28954

    03/01/2023, 9:29 AM
    if your text also listens to the pointerOver event, it's parent will be pointerOut-ed when you hover the text inside
  • a

    ambitious-knife-25690

    03/01/2023, 12:42 PM
    I don't understand? I can see this happening, but is there a way around this? or do I need to a custom bounds check on haxeui's side
  • a

    ambitious-knife-25690

    03/01/2023, 12:45 PM
    to say 'children of this parent should ignore pointer events'
  • a

    ambitious-knife-25690

    03/01/2023, 12:55 PM
    or the parent should absorb the pointer events
  • b

    billowy-waiter-28954

    03/01/2023, 1:03 PM
    The deepest child that listens to the event you are testing will consume the event
  • a

    ambitious-knife-25690

    03/01/2023, 2:07 PM
    hmm, i'm confused tho as i apply the pointerevent to only the parent
  • a

    ambitious-knife-25690

    03/01/2023, 2:11 PM
    sorry, maybe i'm missing something really obvious here 😅
  • b

    billowy-waiter-28954

    03/01/2023, 2:25 PM
    I think if you don’t understand how something work, you should create a blank ceramic project to test your very specific use case
  • b

    billowy-waiter-28954

    03/01/2023, 2:26 PM
    And if there is really something not going right on that test case, then you’ll be able to send me that test project so that I take a look
  • a

    ambitious-knife-25690

    03/01/2023, 3:46 PM
    Ah thanks, i'm not sure why i didn't think to try this myself
  • a

    ambitious-knife-25690

    03/01/2023, 3:46 PM
    this works as expected but it doesn't work as expected in the haxeui backend
  • a

    ambitious-knife-25690

    03/01/2023, 3:47 PM
    Copy code
    hx
            var a = new Quad();
            a.size(100, 100);
            a.color = Color.GREEN;
            add(a);
    
            var b = new Quad();
            b.size(60, 60);
            b.x = (a.width / 2) - 30;
            b.y = (a.height / 2) - 30;
            b.color = Color.RED;
            a.add(b);
    
            a.onPointerOver(a, (info) -> {
                a.color = Color.BLUE;
            });
    
            a.onPointerOut(a, (info) -> {
                a.color = Color.GREEN;
            });
    
            a.onPointerDown(a, (info) -> {
                a.color = Color.PURPLE;
                b.color = Color.PURPLE;
            });
    
            a.onPointerUp(a, (info) -> {
                a.color = Color.GREEN;
                b.color = Color.RED;
            });
  • a

    ambitious-knife-25690

    03/01/2023, 3:47 PM
    i figured this is essentially what is going in haxeui when i apply pointer events, but for some reason it isn't 🤔
  • a

    ambitious-knife-25690

    03/01/2023, 3:52 PM
    I am still confused because i'm not sure why what I have isn't working now but i can rule out that I don't understand the ceramic side
  • b

    billowy-waiter-28954

    03/01/2023, 3:54 PM
    There must be something different in the case of haxe-ui, you must simply find what, I guess
  • a

    ambitious-knife-25690

    03/01/2023, 3:58 PM
    interestingly the example loses focus if i overlay the drop down on it
  • a

    ambitious-knife-25690

    03/01/2023, 3:58 PM
    would you expect the dropdown to maintain focus here?
  • a

    ambitious-knife-25690

    03/01/2023, 4:01 PM
    i think the effect above is pretty much what is going on within the dropdown
  • a

    ambitious-knife-25690

    03/01/2023, 4:01 PM
    but i'm not sure what the issue here is 🤔
  • a

    ambitious-knife-25690

    03/01/2023, 4:10 PM
    @billowy-waiter-28954```hx var a = new Quad(); a.depth = 0; a.size(100, 100); a.color = Color.GREEN; var b = new Quad(); b.size(60, 60); b.x = (a.width / 2) - 30; b.y = (a.height / 2) - 30; b.color = Color.RED; a.add(b); a.onPointerOver(a, (info) -> { a.color = Color.BLUE; }); a.onPointerOut(a, (info) -> { a.color = Color.GREEN; }); a.onPointerDown(a, (info) -> { a.color = Color.PURPLE; b.color = Color.PURPLE; }); a.onPointerUp(a, (info) -> { a.color = Color.GREEN; b.color = Color.RED; }); var c = new Quad(); c.depth = 1; c.size(100, 40); c.color = Color.DEEPPINK; c.onPointerOver(c, (info) -> { c.color = Color.YELLOW; }); c.onPointerOut(c, (info) -> { c.color = Color.DEEPPINK; }); c.onPointerDown(c, (info) -> { c.color = Color.LAVENDER; }); c.onPointerUp(c, (info) -> { c.color = Color.DEEPPINK; }); add(c); add(a); ```
  • a

    ambitious-knife-25690

    03/01/2023, 4:11 PM
    okay, this is a repro of what I believe is happening on the haxeui side
  • a

    ambitious-knife-25690

    03/01/2023, 4:13 PM
    even if
    c
    becomes a child of
    a
    the pointer events of the parent lose focus
  • a

    ambitious-knife-25690

    03/01/2023, 4:15 PM
    (the above is with
    c
    being a child of
    a
    )
  • b

    billowy-waiter-28954

    03/01/2023, 4:25 PM
    This is normal behaviour. c is listening to pointerOver/Out, so it takes priority over its parent, thus the parent loses focus when the child a gets it
  • a

    ambitious-knife-25690

    03/01/2023, 4:27 PM
    how would I work around this? In the actual backend c never assigns pointer events
  • a

    ambitious-knife-25690

    03/01/2023, 4:27 PM
    so it seems odd to have it steal focus
  • b

    billowy-waiter-28954

    03/01/2023, 4:28 PM
    I don't know what you are doing exactly with haxe-ui, but this is the same behaviour as, say, html5
1...868788...124Latest