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

    bright-gpu-74537

    02/19/2023, 4:45 PM
    what backend is this?
  • b

    bumpy-engineer-49082

    02/19/2023, 4:45 PM
    kha
  • b

    bright-gpu-74537

    02/19/2023, 4:45 PM
    did this work?
  • b

    bumpy-engineer-49082

    02/19/2023, 4:46 PM
    no.
  • b

    bright-gpu-74537

    02/19/2023, 4:46 PM
    you'll have to share some code or something, it seems quite odd... But ill need a repro in order to understand whats going on
  • b

    bumpy-engineer-49082

    02/19/2023, 4:51 PM
    Should i send particular files or the whole project?
  • b

    bright-gpu-74537

    02/19/2023, 4:51 PM
    runnable project would be ideal
  • b

    bumpy-engineer-49082

    02/19/2023, 4:51 PM
    It weights 2gbs 🥲
  • b

    bright-gpu-74537

    02/19/2023, 4:52 PM
    that seems.. ... large... i dont need the git history or build
  • b

    bumpy-engineer-49082

    02/19/2023, 4:54 PM
    .git/module/kha has 1.3Gb of files in it. Is it okay?
  • b

    bright-gpu-74537

    02/19/2023, 4:54 PM
    just dont include any of the .git stuff in the zip
  • b

    bumpy-engineer-49082

    02/19/2023, 4:54 PM
    Okay.
  • e

    early-butcher-76809

    02/19/2023, 5:32 PM
    So, let's say I have some UI component, define by XML (basically, an image with smaller images on its right, in a hbox), and I want it to be shown with different sizes, among other components. Its shape can vary (showing or hiding images depending on circumstances). It will most likely be added (can be multiple times, it's dynamic and not known in advance) in a container box of another XML defined component. How would you do that ? If I give it ``width="100%" height="100%"``, it will be deformed in a horizontal or vertical box. I don't think I can keep its ratio and have its width scaled if the height is set through its parent (by being 100%). Do I have to make 2 XML files for the 2 different sizes, with px width and height ?
  • e

    early-butcher-76809

    02/19/2023, 5:39 PM
    I mean, it can be simplified like this : I want to dynamically add images in a hbox (let's say by clicking a button). I want their ratio to be kept. I also want to be able to do it twice, with different sizes.
  • e

    early-butcher-76809

    02/19/2023, 5:39 PM
    That's 2 components, one for the hbox and one for the image
  • e

    early-butcher-76809

    02/19/2023, 5:39 PM
    How would you do that ? :D
  • e

    early-butcher-76809

    02/19/2023, 6:47 PM
    I may have found a way thanks to scripts !
  • e

    early-butcher-76809

    02/19/2023, 6:50 PM
    (My issue was linked to the fact I wanted to have most of my UI stuff in XML files and not hard coded somewhere, so it could be easily edited. Scripts allow the addition of that kind of things, by having the ability to code stuff inside the data !)
  • f

    full-journalist-82607

    02/19/2023, 8:39 PM
    @early-butcher-76809 you can use scaleMode for images
  • f

    full-journalist-82607

    02/19/2023, 8:39 PM
    https://github.com/haxeui/haxeui-core/blob/02663d838e5c175b39fd966570a74d1acbc6147f/haxe/ui/constants/ScaleMode.hx#L4
  • r

    refined-cat-44047

    02/20/2023, 5:30 AM
    The commit
    67aa20ed
    in haxeui-core seems to break textfield components that are empty but with placeholder text that use the locale system
  • e

    early-butcher-76809

    02/20/2023, 7:21 AM
    Wow, that's nice ! Thank you <3
  • e

    early-butcher-76809

    02/20/2023, 7:21 AM
    It seems to only work with images, though (and it's already great ! :D). D'you know of any way to have smth like that applied to font size for other stuff ? ^^'
  • e

    early-butcher-76809

    02/20/2023, 7:44 AM
    I've seen ``font-size`` could technically use exotic parameters (min, max, clamp...) but since hscript has been removed, it seems we can't use custom function akin to ``parent.height``
  • e

    early-butcher-76809

    02/20/2023, 7:44 AM
    I might be wrong. I hope I am :D
  • e

    early-butcher-76809

    02/20/2023, 7:44 AM
    The must be a way to get a dynamic font size, right ? ^^
  • e

    early-butcher-76809

    02/20/2023, 7:46 AM
    Or is it only possible with screen size ? :(
  • e

    elegant-twilight-61392

    02/20/2023, 7:50 AM
    i could very easily be wrong, but i thought hscript was used for script pieces inside an xml, but for when you load the xml at runtime instead of compile time
  • e

    elegant-twilight-61392

    02/20/2023, 7:51 AM
    also you could just change the font size in your code
  • e

    early-butcher-76809

    02/20/2023, 7:54 AM
    Ah ! You're right, I opened the hx file directly and VSCode tole me ``#if hscript`` was false
1...152615271528...1687Latest