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

    icy-zebra-52882

    01/15/2023, 1:39 PM
    I think the reason I put them in was to try to make it responsive to resizing, like adding space between the labels and and select boxes if there were room
  • b

    bright-gpu-74537

    01/15/2023, 2:50 PM
    i think autosized and % sizes are (kinda) mutally exclusive, you might be able to do something funky with
    initial-width
    /
    initial-height
    in css, but might not work at all, not sure
  • b

    bright-gpu-74537

    01/15/2023, 3:15 PM
    this is fun:
  • b

    bright-gpu-74537

    01/15/2023, 3:16 PM
    set the font size on the label, and the menu font changes... wtf 😄
  • h

    happy-agent-4114

    01/15/2023, 3:50 PM
    How would i do this
  • f

    full-journalist-82607

    01/15/2023, 3:56 PM
    when you drop the component A on a container B, you make the container B the parent component of A,. But, what do you want to do, you want to drop a label on a a vbox for example ?
  • b

    bright-gpu-74537

    01/15/2023, 4:08 PM
    well, the component would need to be farther "down" the tree in order to be "above" previous children
  • b

    bright-gpu-74537

    01/15/2023, 4:08 PM
    http://haxeui.org/builder/?b8b49cc1
  • h

    happy-agent-4114

    01/15/2023, 4:09 PM
    If i did something like add the boxes on page load it would default to the top, right?
  • b

    bright-gpu-74537

    01/15/2023, 4:09 PM
    think were about there, just need to do some clean up, etc
  • b

    bright-gpu-74537

    01/15/2023, 4:10 PM
    nope, i dont think so, by default addComponent will add things to the end of the component tree (well, end of the parents child list)
  • h

    happy-agent-4114

    01/15/2023, 4:16 PM
    So the easiest way to do this would be something like making the draggable box at the end and setting its x and y programmatically?
  • h

    happy-agent-4114

    01/15/2023, 4:16 PM
    or just not making it draggable
  • b

    bright-gpu-74537

    01/15/2023, 4:19 PM
    well, the way i would do it (assuming im understanding), is put all your "behind" UI in a box, then put your draggable stuff in that box, so it will then be "above" the "behind" UI... but if you are talking about dragging arbitrary UI components from anywhere in the tree to anywhere else in the tree, then you'll have to do more work (like removing it from its current location and adding it to some top level component / screen)
  • c

    creamy-animal-95850

    01/15/2023, 4:21 PM
    wow, very nice! how did you end up handling the sdf properties?
  • b

    bright-gpu-74537

    01/15/2023, 4:22 PM
    yeah, so i was just about to write that... so, you'll need to do something like this:
    Copy code
    haxe
    haxe.ui.backend.heaps.SDFFonts.register("sbf/segoeui.fnt", 4, .5, .45);
  • c

    creamy-animal-95850

    01/15/2023, 4:23 PM
    ah ok
  • b

    bright-gpu-74537

    01/15/2023, 4:23 PM
    even if you dont want to screw with the params, you'll have to still "register" the font as SDF:
    Copy code
    haxe
    haxe.ui.backend.heaps.SDFFonts.register("sbf/segoeui.fnt");
    since haxeui will need to know this is an SDF font... i might be able to autodetect it, but im not sure, and this feels like a safer way
  • c

    creamy-animal-95850

    01/15/2023, 4:24 PM
    that's probably for the best, since both types of fonts are .fnt, Bitmapfont, etc.
  • c

    creamy-animal-95850

    01/15/2023, 4:24 PM
    it's up to the user to distinguish it
  • b

    bright-gpu-74537

    01/15/2023, 4:24 PM
    yeah, i think i could open the .fnt file as text as search for things, like
    <distanceField fieldType="msdf" distanceRange="4"/>
    maybe, but im unsure and it feels brittle
  • b

    bright-gpu-74537

    01/15/2023, 4:26 PM
    anyways, thats all in now, latest haxeui-heaps and latest haxeui-core (needed a tiny change to allow the font name to passed around)
  • b

    bright-gpu-74537

    01/15/2023, 4:26 PM
    lemme know if it works 🙂
  • c

    creamy-animal-95850

    01/15/2023, 4:27 PM
    eh that's probably overkill
  • c

    creamy-animal-95850

    01/15/2023, 4:44 PM
    looks like I'm still getting weird results
  • c

    creamy-animal-95850

    01/15/2023, 4:44 PM
    bitmap:
  • c

    creamy-animal-95850

    01/15/2023, 4:44 PM
    sdf:
  • c

    creamy-animal-95850

    01/15/2023, 4:45 PM
    sdf looks like it's partially working, like it was just cut up wrong
  • b

    bright-gpu-74537

    01/15/2023, 4:45 PM
    can you try and repro in a minimal repro? I gotta pop out, but i can take a look when i get back (are you sure you got the changes, haxelib lies sometimes)
  • c

    creamy-animal-95850

    01/15/2023, 4:46 PM
    sure, one sec
1...137913801381...1687Latest