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

    full-journalist-82607

    07/22/2022, 5:34 PM
    When you select the second optionbox, it doesn't get bold,
  • f

    full-journalist-82607

    07/22/2022, 5:42 PM
    Ohit seems reallymysterious
  • f

    full-journalist-82607

    07/22/2022, 5:43 PM
    Copy code
    <vbox>
        <style>
    .bold .label {
        font-bold: true;
    }
    </style>
        <optionbox text="I am born bold" styleNames="bold" />
        <optionbox text="Check Me to add boldness!" onchange="this.text='should be'; this.addClass('bold');" />
        <optionbox text="Check Me to add boldness!" onchange="this.text='should be b'; this.addClass('bold');" />
        <button text="Click Me!" onclick="this.addClass('bold');" />
    </vbox>
  • f

    full-journalist-82607

    07/22/2022, 5:45 PM
    the option box with the text "should be" doesn't work, the option box with the text 'should be b' works,
  • f

    full-journalist-82607

    07/22/2022, 5:46 PM
    ( on the haxeui builder page)
  • p

    purple-businessperson-14467

    07/22/2022, 6:52 PM
    shouldnt be in a not directly in ?
  • f

    full-journalist-82607

    07/22/2022, 6:53 PM
    you're thinking of item renderers ?
  • p

    purple-businessperson-14467

    07/22/2022, 6:55 PM
    sorry had my head in wrong socket
  • f

    full-journalist-82607

    07/22/2022, 7:07 PM
    nice phrase ! 😉
  • p

    purple-businessperson-14467

    07/22/2022, 7:22 PM
    Interestingly this works http://haxeui.org/builder/?qoulsq this doesnt http://haxeui.org/builder/?zktahz also clicking items in order 2,3 or 3,2 has same wrong effect http://haxeui.org/builder/?ezccim adding class without changing text never works
  • b

    bright-gpu-74537

    07/22/2022, 9:22 PM
    that does feel like a bug - so basically, just to understand the selected option box should be bold, right?
  • b

    bright-gpu-74537

    07/22/2022, 9:23 PM
    hang on, dont you also need to remove bold?
  • b

    bright-gpu-74537

    07/22/2022, 9:23 PM
    oh, but yeah, it still doesnt work as i would have expected it
  • b

    bright-gpu-74537

    07/22/2022, 9:34 PM
    http://haxeui.org/builder/?onwcoj
  • b

    big-angle-82801

    07/22/2022, 10:48 PM
    is it possible to only add certain components in xml markup depending on whether a compiler flag is set?
  • b

    big-angle-82801

    07/22/2022, 10:49 PM
    So for example a component is ignored if a
    dev
    flag isn't set
  • b

    big-angle-82801

    07/22/2022, 10:49 PM
    but otherwise it gets added normally
  • b

    bright-gpu-74537

    07/22/2022, 10:56 PM
    hmmm, i try to avoid this type of "logic in xml", but you might be able to get away with it
  • b

    bright-gpu-74537

    07/22/2022, 10:56 PM
    (ie, i hate "ifs" or "loops" in xml)
  • b

    bright-gpu-74537

    07/22/2022, 10:57 PM
    i think there is a condition attribute, but i dont know how deeps it goes, i know its available for modules
  • b

    bright-gpu-74537

    07/22/2022, 11:00 PM
    so... there is defo is a condition attribute, im just trying to remember how it works
  • b

    bright-gpu-74537

    07/22/2022, 11:00 PM
    (this is all very ugly imo btw 🙂 )
  • b

    bright-gpu-74537

    07/22/2022, 11:04 PM
    ... right, so "condition" seems a little broken, i guess, i should fix that, however, you can use "if" or "unless" and that seems to work, eg:
  • b

    bright-gpu-74537

    07/22/2022, 11:04 PM
    <button text="Bob" if="someprop" />
  • b

    bright-gpu-74537

    07/22/2022, 11:04 PM
    without
    -Dsomeprop
    the "Bob" button wont show
  • b

    big-angle-82801

    07/22/2022, 11:05 PM
    yh, tbh I'm usually like that as well 😅 is there another way you'd recommend instead of that? I can hide the components but i would prefer if they didn't end up in the generated code
  • b

    bright-gpu-74537

    07/22/2022, 11:06 PM
    honestly, i would (and do) prefer an #ifdef
  • b

    bright-gpu-74537

    07/22/2022, 11:06 PM
    the if / unless is there for you to abuse, im not a fan, but im sure there are use cases
  • b

    big-angle-82801

    07/22/2022, 11:08 PM
    yh, hm, I guess I can just remove their logic on the code side, that's probably the main thing
  • b

    bright-gpu-74537

    07/22/2022, 11:08 PM
    just, to me, the idea of
    <include source="debug_window" if="debug" />
    seems totally sensible at the time, but its (again, to me) awful design
1...118011811182...1687Latest