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

    full-journalist-82607

    09/08/2022, 3:06 PM
    Happy Birthday . I have a bug(or bad description) for you 🎁 πŸ™‚ In the dragoptions. Its is said
    Copy code
    /**
         * A Rect specifying the bounds in the screen's coordinate space.
         * Default: screen's bounds
         */
        @:optional var dragBounds:Rectangle;
    But in fact its the rectangle compared to the x, y of the dragged component, which is not very instinctive. ( Because it's not easy to calculate when a component position isn't calculated yet)
  • b

    best-agent-85158

    09/08/2022, 3:22 PM
    Happy Birthday!!πŸŽ‰πŸŽ‰πŸŽ‰
  • b

    bright-gpu-74537

    09/08/2022, 3:23 PM
    sounds like more of a bad description... id like to revamp / extend the dragmanager soon(ish) as there is a bunch of other stuff id like to do with with...
  • b

    bright-gpu-74537

    09/08/2022, 3:23 PM
    thanks! πŸ™‚
  • f

    full-journalist-82607

    09/08/2022, 3:31 PM
    Ok cool. i'l wait before using the drag options then πŸ™‚ Have a nice weekend ! πŸ™‚
  • b

    bright-gpu-74537

    09/08/2022, 3:32 PM
    well, use the current impl by all means, i mean, im not going to be changing anything there anytime soon
  • b

    bright-gpu-74537

    09/08/2022, 3:33 PM
    i think its just a lΒ‘ttle bit of a bad decription... the problem is that if you have an absolute at position 100x100, then you are going to be naturally bound by the size and position of that component (regardless of the bounds)
  • b

    bright-gpu-74537

    09/08/2022, 3:33 PM
    or, actually, is that right? πŸ€”
  • b

    bright-gpu-74537

    09/08/2022, 3:34 PM
    so yeah, the drag manager calls "moveComponent" on the currently dragged component
  • b

    bright-gpu-74537

    09/08/2022, 3:35 PM
    which means if its in a parent component that is 100x100 size, then really, you are already constrained by the 100x100 (i mean, effectively)... really it should probably pop it out the container (or ghost it) and put in on the screen (rather than leave it in the component tree)
  • b

    bright-gpu-74537

    09/08/2022, 3:39 PM
    ... ... ... anyways ... ... ... ill check it out... id like it to become much more useful in general (like dragging and dropping between components)
  • f

    full-journalist-82607

    09/08/2022, 3:45 PM
    Yeah dragging between components is awesome, I'm using it this way. When dragging it , I move it one the ancestor component ( the one I want be the z-index to be over) , I lock the layout during the dragging, then add the dragged component to the target component at the drag end and unlock all the layouts. Hacky, but not so complicated and works nearly perfectly , ( the second time I drag an object it appears for a frame at 0,0 but I put the opacity at 0 just for this frame) .
  • b

    bright-gpu-74537

    09/08/2022, 3:46 PM
    oh, very interesting... ill be coming to you then for opinions... got a gif of it in action? Im curious
  • f

    full-journalist-82607

    09/08/2022, 3:48 PM
    Yeah, I can record it πŸ™‚
  • b

    bright-gpu-74537

    09/08/2022, 3:48 PM
    no rush, just curious to see what you came up with
  • f

    full-journalist-82607

    09/08/2022, 3:59 PM
    Oh I didn't record the mouse . There is a menu component which contain all the menu rods. And the grid contains plenty of boxes where I add the image
  • b

    bright-gpu-74537

    09/08/2022, 4:00 PM
    interesting stuff, think this already goes out of the "general" usage of drag manager... like, i dont think there is any built in "drop" functionality
  • b

    bright-gpu-74537

    09/08/2022, 4:01 PM
    would be interesting to see what we can come up with to make things like this "effortless"
  • b

    bright-gpu-74537

    09/08/2022, 4:02 PM
    another one that came up in a GH issue is the ability to drag / drop nodes in a treeview, but, if that is going to be implemented (which would be nice), then i would prefer to drag / drop items between any components (eg: drag nodes off a treeview and drop them in a listview, drag them off a listview and drop them in a tableview, then drag / drop them back to the treeview)
  • b

    bright-gpu-74537

    09/08/2022, 4:03 PM
    (but all in such a way that its not really specific to tree, list or table)
  • b

    bright-gpu-74537

    09/08/2022, 4:05 PM
    (is the first video a "counting" program / teacher?)
  • f

    full-journalist-82607

    09/08/2022, 4:12 PM
    Yeah, it is an educational project ( which teaches reading, counting, multipling, all the basics, in multiple languages) , which I abandonned for a few years, I first made it in Stencyl. But i worked so much on it, I just couldn't open Stencyl anymore and finish it well. But I have I found my motivation back by using haxeui, which have nearly everything I need. Plus the project is so big, that I'm confident that haxeui will have the feature I want when I need it haha.
  • f

    full-journalist-82607

    09/08/2022, 4:21 PM
    >
    Copy code
    var originBox = objects[line][column];
    >         component.registerEvent(MouseEvent.MOUSE_DOWN, function(e) {
    >             if (component.draggable) {
    >                 if (component.parentComponent != null)
    >                     Utils.changeParentContainer(component, this);
    >                     this.lockLayout();
    >             }
    >         }, 9999);
    Here is part of the code for the behaviour in the grid. The instereseting part , is the MOUSE_DOWN, which I highly prioritises the change the parent component. The changeParentContainer just change the parent container, and sets the x an y at the correct position .
  • g

    great-oyster-61535

    09/09/2022, 2:59 AM
    I'm veeery late but happy birthday dude have a great day!
  • i

    icy-zebra-52882

    09/09/2022, 8:12 AM
    happy yesterbirthday!
  • b

    bright-gpu-74537

    09/09/2022, 8:37 AM
    thanks guys πŸ™‚
  • r

    refined-laptop-39041

    09/10/2022, 10:46 PM
    The ``haxeui-kha`` readme recommends installing hscript, I assume I don't need that anymore?
  • a

    ambitious-knife-25690

    09/10/2022, 11:05 PM
    correct haxeui got rid of the hscript dependency
  • r

    refined-laptop-39041

    09/10/2022, 11:24 PM
    Yeah, I know that. I just didn't know if the Kha core required it
  • a

    ambitious-knife-25690

    09/10/2022, 11:26 PM
    afaik hscript was a dependency of haxeui-core, not of the backends
1...125412551256...1687Latest