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

    bumpy-engineer-49082

    05/02/2023, 12:32 AM
    Yeah, single time issue. Nevermind.
  • a

    ambitious-knife-25690

    05/02/2023, 12:33 AM
    there's an
    onScroll
    event you can set on a scrollview
  • a

    ambitious-knife-25690

    05/02/2023, 12:33 AM
    maybe you could do some magic with that?
  • e

    early-butcher-76809

    05/02/2023, 12:33 AM
    Oh !
  • a

    ambitious-knife-25690

    05/02/2023, 12:33 AM
    scroll.onScroll = function (data) {}
  • a

    ambitious-knife-25690

    05/02/2023, 12:34 AM
    which uncovers a couple of actual scroll events
  • a

    ambitious-knife-25690

    05/02/2023, 12:34 AM
    you should be able to bind to those as well
  • e

    early-butcher-76809

    05/02/2023, 12:36 AM
    As the name suggests, it fires when the view is scrolled (mouse wheel, or setting the scroll value manually). It was worth the try, though :P
  • a

    ambitious-knife-25690

    05/02/2023, 12:37 AM
    ahhhhh
  • a

    ambitious-knife-25690

    05/02/2023, 12:37 AM
    could you not check if the scrollview changes
  • a

    ambitious-knife-25690

    05/02/2023, 12:38 AM
    but add some kind of bool
  • Scroll view
    a

    ambitious-knife-25690

    05/02/2023, 12:38 AM
    if (!justaddedcomponent) return; ... do stuff
    e
    • 2
    • 38
  • b

    bright-gpu-74537

    05/02/2023, 4:40 AM
    @early-butcher-76809 - i think you are looking for either of these: http://haxeui.org/builder/?e03820a7 ?
  • b

    bright-gpu-74537

    05/02/2023, 4:40 AM
    (ie,
    validateNow
    or
    Toolkit.callLater
    ? )
  • b

    bright-gpu-74537

    05/02/2023, 5:03 AM
    heh, nice... didnt get it at first, i was just like "isnt that just the haxeui logo"? Then i remember your original q
  • b

    bright-gpu-74537

    05/02/2023, 5:55 AM
    alright, this is working now... now you can use layout / layoutName in xml (they both do the same thing now), also, you can use "layout" in css... this in fact was never working, it was never actually linked up (it is now)
  • b

    bright-gpu-74537

    05/02/2023, 6:32 AM
    so property grids dont really support "any component", the components they support are based on the "type" (bool, int, etc)... that said, i think an action type might be nice...
  • b

    bright-gpu-74537

    05/02/2023, 6:32 AM
    i also might investigate "any component", but i dont think its feasible since the component would have to be and IValueComponent (currently), though maybe that could change to InteractiveComponent... 🤔
  • b

    bright-gpu-74537

    05/02/2023, 6:36 AM
    (actually, InterctiveComponent already implements IValueComponent... thats nice past me 🙂 )
  • f

    full-journalist-82607

    05/02/2023, 6:54 AM
    Awesome , thanks 🤟 it's funny I was convinced it had been working, because I had always thought it was such a cool feature 🙂 Now it will make it easier to have different designs for landscape/portrait/ different sizes.
  • b

    bright-gpu-74537

    05/02/2023, 6:57 AM
    yeah, it was kinda interesting looking over the old layout code... some stuff is actually already implemented, like if you do
    <box layout="vertical" layoutSomeProp="..." />
    it will actually generate code something like (this is the newer version of the code):
    Copy code
    haxe
    var l0 = LayoutFactory.createFromName("vertical");
    l0.someProp = "...";
    c0 = new Box();
    c0.layout = l0
  • b

    bright-gpu-74537

    05/02/2023, 6:57 AM
    i left that being a possibility, but actually, there are no props (interesting ones anyway) on layouts... but its nice it was already basically implemented
  • f

    full-journalist-82607

    05/02/2023, 7:06 AM
    Oh interesting ... I have a few custom layouts. Maybe it could be useful. I wonder how custom layouts work with css/xml . I think there was something not implemenented. Hmmm, actually layout prop is super interesting. Like my usual custom layouts are usually like grid, vbox but from bottom to top, this kind of think. It makes it easier to make some super charged layouts.
  • b

    bright-gpu-74537

    05/02/2023, 7:07 AM
    ok, so there is a limitation, which is that the result in LayoutFactory are hardcoded: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/layouts/LayoutFactory.hx#L5
  • b

    bright-gpu-74537

    05/02/2023, 7:08 AM
    but this could be gotten from a module (like components are)... i wasnt thinking to implement it yet, because i assumed no one was using custom layouts
  • f

    full-journalist-82607

    05/02/2023, 7:08 AM
    Yeah, that what I was thinking of . I remembered the TODO 🙂
  • b

    bright-gpu-74537

    05/02/2023, 7:09 AM
    do you have an example to hand of how you use custom layouts (just so we are on the same page)
  • f

    full-journalist-82607

    05/02/2023, 7:10 AM
    For example this uses a BottomGridLayout

    https://cdn.discordapp.com/attachments/565569107701923852/1102854675130224660/image.pngâ–¾

  • b

    bright-gpu-74537

    05/02/2023, 7:11 AM
    so it aligns dots (children) on a grid, but from the bottom?
  • f

    full-journalist-82607

    05/02/2023, 7:12 AM
    Exactly
1...165616571658...1687Latest