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

    early-butcher-76809

    04/25/2023, 4:59 PM
    Oh, yeah, it could work with padding. I thought of top/left because it's what absolute uses but anything would be nice :P
  • b

    bright-gpu-74537

    04/25/2023, 4:59 PM
    % padding is also not supported (yet) 😄
  • e

    early-butcher-76809

    04/25/2023, 5:00 PM
    Up to now, I managed to use boxes inside boxes inside boxes with different % width/height and alignment but it's a bit of a pain :D
  • b

    bright-gpu-74537

    04/25/2023, 5:00 PM
    i feel like the best way here to cover all based would be: %left / %top, %padding, and also new props: right / bottom (with % versions)
  • b

    bright-gpu-74537

    04/25/2023, 5:01 PM
    so you've opted to go for absolute layouts? 👀
  • e

    early-butcher-76809

    04/25/2023, 5:01 PM
    Well, I hoped something already existed, hence my question :D
  • f

    full-journalist-82607

    04/25/2023, 5:01 PM
    Simple Boxes are better than absolute layouts. You can easily emulate bottom/right in boxes
  • e

    early-butcher-76809

    04/25/2023, 5:02 PM
    Please, elaborate <3
  • b

    bright-gpu-74537

    04/25/2023, 5:02 PM
    i think the main issue (if im following Connard) is not really size / alignment, its left / top positions
  • b

    bright-gpu-74537

    04/25/2023, 5:03 PM
    like if you had a component at 10x10... then you increase the resolution by 2x, you would expect it to be at 20x20
  • f

    full-journalist-82607

    04/25/2023, 5:04 PM
    I was thinking of this http://haxeui.org/builder/?bcc76d90 using margins
  • e

    early-butcher-76809

    04/25/2023, 5:05 PM
    For a concrete example, I have a box in which I want to have an image centered at (66% left, 50% top), being (25% width, 75% height) of my parent box. If I change my box size (because of resolution change or design incremental testing), I want the image to still be there with the right size ^^
  • f

    full-journalist-82607

    04/25/2023, 5:05 PM
    ah ok ...
  • e

    early-butcher-76809

    04/25/2023, 5:09 PM
    Yeah, I used smth like that to place stuff on my HUD but it was much easier then. For more complex layouts, I hoped I could use smth else ^^
  • b

    bright-gpu-74537

    04/25/2023, 5:10 PM
    is there any chance you could knock up a simple "fake" version of this? As i dont get how the height can be 75% and top 50% (isnt that offscreen?)
  • e

    early-butcher-76809

    04/25/2023, 5:10 PM
    Let me open Paint :D
  • e

    early-butcher-76809

    04/25/2023, 5:21 PM
    The scale is off but anyway, if I were to change the black box, the blue box would change accordingly

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

  • e

    early-butcher-76809

    04/25/2023, 5:22 PM
    I mean, it's really just an absolute layout with % instead of PX
  • e

    early-butcher-76809

    04/25/2023, 5:22 PM
    So... relative layout ? :D
  • b

    bright-gpu-74537

    04/25/2023, 5:24 PM
    OK, i think i see... i could be totally off, but i would have thought this is possible without absolute... ... no? (i might be way off)
  • e

    early-butcher-76809

    04/25/2023, 5:25 PM
    Yeah, by playing with boxes width and alignment
  • e

    early-butcher-76809

    04/25/2023, 5:26 PM
    I guess I could have a box 33%w 50%h aligned right/bottom, then set my image inside it (aligned left/top)
  • e

    early-butcher-76809

    04/25/2023, 5:26 PM
    I mean, I can clearly find ways to do it, I just wanted to be sure I wasn't doing overly complicated stuff while missing an easier solution :D
  • e

    early-butcher-76809

    04/25/2023, 5:28 PM
    And since there's no layout allowing it, I'll go the boxes alignments way !
  • e

    early-butcher-76809

    04/25/2023, 5:28 PM
    Thank you ! <3
  • e

    early-butcher-76809

    04/25/2023, 5:28 PM
    Wait no, I have an issue. If I use an intermediary box to position, I lose the size of the parent (the 75%/25%)
  • b

    bright-gpu-74537

    04/25/2023, 5:29 PM
    ill have a play, but my first instinct is this should be totally possible without absolute (or even a complex layout), but i might be totally missing the point
  • b

    bright-gpu-74537

    04/25/2023, 5:30 PM
    is this totally wrong: http://haxeui.org/builder/?5eca89c9 ?
  • e

    early-butcher-76809

    04/25/2023, 5:30 PM
    Well, I guess I can find the 75 back while using the parent 50, so I would be... 227%w and 150%h
  • e

    early-butcher-76809

    04/25/2023, 5:31 PM
    Oh wow, spacer
1...165216531654...1687Latest