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

    helpful-boots-41914

    04/15/2023, 11:11 PM
    I think the way it works is that it's able to pre-calculate it as if there was enough components to overflow at that container-width with the specified children-width and then position everything based on that. It might not be possible, for haxeui's case though, given the children are not guaranteed to be the same dimensions.
  • h

    helpful-boots-41914

    04/16/2023, 4:46 AM
    I was looking into how a scrollview might be combined with a continuous hbox and I think it's broken (at least on html5). Without continuous it works but with it, it looks like the scrollview doesn't know what the width or height of it will be . . . see here: http://haxeui.org/builder/?82bdb291
  • b

    bright-gpu-74537

    04/16/2023, 5:51 AM
    http://haxeui.org/builder/?95f6b6e2
  • b

    bright-gpu-74537

    04/16/2023, 5:51 AM
    contentWidth="100%" and also, your width:100% style didnt have a semi colon after it
  • h

    helpful-boots-41914

    04/16/2023, 5:54 AM
    Ahh didn't see that style attribute issue - my bad! I was trying different things out and I didn't know about contentWidth. Thanks!
  • b

    bright-gpu-74537

    04/16/2023, 7:09 AM
    alright, initial impl is in core now, and example here: http://haxeui.org/explorer/#layouts/horizontal_layouts (may need to ctrl+f5 to force getting latest version)
  • b

    bright-gpu-74537

    04/16/2023, 7:18 AM
    builder updated too, so this works now: http://haxeui.org/builder/?e4a50d11
  • b

    bright-gpu-74537

    04/16/2023, 7:19 AM
    (i really like this change / feature, i can see alot of places where it would be useful)
  • e

    early-butcher-76809

    04/16/2023, 1:11 PM
    Yay, that's very good, gonna use it right now to replace some old stuff ! <3
  • h

    helpful-boots-41914

    04/16/2023, 1:48 PM
    This is awesome! Definitely going to use it in my game. Perfect for my uses. One quick note though that I should have made early on is how it works when there's a single row. Notice, testing this (fewer items) shows it's currently glitched: http://haxeui.org/builder/?89f5a013. But otherwise it's super nice!
  • b

    bright-gpu-74537

    04/16/2023, 1:49 PM
    hmmm, yeah, last row might need a bit of magic calc
  • h

    helpful-boots-41914

    04/16/2023, 1:51 PM
    > (may need to ctrl+f5 to force getting latest version) To get around this in the past I've used a bundler/builder like webpack to take my html5 document and link and generate to a javascript file who's name was a random hash of characters that way the browser knows that what it has cached is no longer valid
  • b

    bright-gpu-74537

    04/16/2023, 1:51 PM
    i dont think it matters too much tbh, the cache invalidates eventually, you mostly dont need to force refresh
  • b

    bright-gpu-74537

    04/16/2023, 1:52 PM
    but if ive literally just uploaded it, then you might do
  • h

    helpful-boots-41914

    04/16/2023, 1:52 PM
    Right - gotcha. I wonder if there are better ways anyways, I sort of need it to be instant for my game haha (the caching problem that is)
  • b

    bright-gpu-74537

    04/16/2023, 1:53 PM
    just tell the browser not to cache anything in the page meta
  • h

    helpful-boots-41914

    04/16/2023, 1:54 PM
    Can you do that for just one asset though? I'll look into that
  • b

    bright-gpu-74537

    04/16/2023, 1:54 PM
    actually, reading about it, it seems that that isnt foolproof
  • b

    bright-gpu-74537

    04/16/2023, 1:54 PM
    https://stackoverflow.com/questions/7413234/how-to-prevent-caching-of-my-javascript-file
  • b

    bright-gpu-74537

    04/16/2023, 1:55 PM
    so yeah, i guess just a random guid when you serve the page
  • h

    helpful-boots-41914

    04/16/2023, 1:58 PM
    Oh man I just realized I'll need to do it for my assets too haha. But yeah looks like guids or versions are necessary for that
  • b

    bright-gpu-74537

    04/16/2023, 2:18 PM
    http://haxeui.org/builder/?bc55571d thoughts?
  • b

    bright-gpu-74537

    04/16/2023, 2:19 PM
    i basically dont space at all if there is a single row
  • b

    bright-gpu-74537

    04/16/2023, 2:19 PM
    i feel like its ... ... ... better
  • b

    bright-gpu-74537

    04/16/2023, 2:21 PM

    https://cdn.discordapp.com/attachments/565569107701923852/1097164839786385488/justified-spacing2.gif▾

  • b

    bright-gpu-74537

    04/16/2023, 2:21 PM
    this kinda annoys me, but im not sure there is a good way round it
  • h

    helpful-boots-41914

    04/16/2023, 2:22 PM
    I feel like this is probably the best outcome given the complexity that could occur if you go with the way Html Grid does it (which technically has a predefined size so it's not the same approach as what you'd do)
  • h

    helpful-boots-41914

    04/16/2023, 2:23 PM
    Maybe it wouldn't even be that difficult for you, I'm not sure what the code would look like
  • h

    helpful-boots-41914

    04/16/2023, 2:24 PM
    But, assuming the children inside of the continuous container are the same size then basically (when there's one row with few elements) it still justifies the elements but places them as if the row was full (for its size)
  • h

    helpful-boots-41914

    04/16/2023, 2:25 PM
    You could probably take the average width as a general size to do this is what I'm thinking. But not sure you'd want to go this route
1...163516361637...1687Latest