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

    bright-gpu-74537

    12/24/2022, 8:18 AM
    Copy code
    xml
    <vbox style="padding: 5px;">
        <button id="comp1" text="bob" />
        <somecomponent id="comp2" />
    </vbox>
  • b

    bright-gpu-74537

    12/24/2022, 8:19 AM
    i dunno if ive understood your problem correctly?
  • f

    full-journalist-82607

    12/24/2022, 4:47 PM
    Hmm, do icons appear on buttons for haxeui-hxwidgets ? It seems by looking at the code it should. Now, I've put a trace in the validateData() of the behaviours.ControlBitmap, and it doesn't show. (It shows for a normal image)
  • b

    bright-gpu-74537

    12/24/2022, 4:50 PM
    should certainly work... got any sample code?
  • b

    bright-gpu-74537

    12/24/2022, 4:51 PM
    is it just
    myButton.icon = "somthing.png"
    ?
  • f

    full-journalist-82607

    12/24/2022, 4:52 PM
    I just put .button { icon:"haxeui-core/styles/shared/check-blue.png"; }
  • b

    bright-gpu-74537

    12/24/2022, 4:52 PM
    ... should also work
  • b

    bright-gpu-74537

    12/24/2022, 4:52 PM
    two secs
  • b

    bright-gpu-74537

    12/24/2022, 4:56 PM
    hmmm...
  • f

    full-journalist-82607

    12/24/2022, 4:58 PM
    Strange
  • b

    bright-gpu-74537

    12/24/2022, 4:59 PM
    so actually, i dont think that has ever worked
  • b

    bright-gpu-74537

    12/24/2022, 4:59 PM
    there is a bit of code in the composite buider for button that sets the icon from the style
  • b

    bright-gpu-74537

    12/24/2022, 5:00 PM
    that doesnt exist in native
  • f

    full-journalist-82607

    12/24/2022, 5:01 PM
    So what's the image you're posting ? Are you sure it doesn't exist in ative, I think it does . One moment .
  • b

    bright-gpu-74537

    12/24/2022, 5:02 PM
    well, i mean, the native button isnt linked up to read the style and apply the icon
  • b

    bright-gpu-74537

    12/24/2022, 5:02 PM
    it is now though 🙂
  • f

    full-journalist-82607

    12/24/2022, 5:02 PM
    There's a SetBitmapPosition() inhttps://docs.wxwidgets.org/3.0/classwx_any_button.html#a9d4e6eb774aa5d19b6f75c48439d3685
  • f

    full-journalist-82607

    12/24/2022, 5:02 PM
    Ah okay 🙂
  • b

    bright-gpu-74537

    12/24/2022, 5:02 PM
    alright, pushed
  • b

    bright-gpu-74537

    12/24/2022, 5:03 PM
    another nice catch, guess ive only ever used the .icon property... at least that wasnt something i broke, it was something that had never been implemented
  • f

    full-journalist-82607

    12/24/2022, 5:06 PM
    Awesome, it works 🙂
  • f

    full-journalist-82607

    12/24/2022, 5:07 PM
    Thanks again 👍
  • b

    bright-gpu-74537

    12/24/2022, 5:08 PM
    np 🙂
  • h

    hallowed-ocean-84954

    12/24/2022, 5:24 PM
    I have two related cases - one with a customer component made up only of HaxeUI components. And a second which is made up of both that first custom component and other HaxeUI comps. So your example below looks like the second case. I'll try a refresh of my of git haxeui-core and see
  • b

    bright-gpu-74537

    12/24/2022, 5:26 PM
    i think, well, hopefully, it should clear up both cases
  • h

    hallowed-ocean-84954

    12/24/2022, 5:26 PM
    building now - should know v soon
  • b

    bright-gpu-74537

    12/24/2022, 5:27 PM
    cool, well, regardless, the old code didnt make alot of sense
  • b

    bright-gpu-74537

    12/24/2022, 5:27 PM
    Copy code
    haxe
                    var c = findComponent($v{variable}, $componentTypeExpr);
                    if (c == null) {
                        trace("WARNING: no child component found: " + $v{variable});
                        return haxe.ui.util.Variant.fromDynamic(null);
                    }
                    return c.$field;
    vs
    Copy code
    haxe
    return $i{variable}.$field;
  • h

    hallowed-ocean-84954

    12/24/2022, 5:28 PM
    ok - so it built and it runs - which means I have access from the Haxe code
  • h

    hallowed-ocean-84954

    12/24/2022, 5:28 PM
    so cool - yes that seems to have sorted it
1...135213531354...1687Latest