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

    bright-gpu-74537

    08/09/2022, 9:25 PM
    ... ... ... 12/2/2022...
  • l

    loud-salesclerk-7438

    08/09/2022, 9:32 PM
    well, a quick test with openfl/lime (haxelib) and haxeui (git) shows my login sample has a lot more failures, like entering username and password in the username field, so I need analyse what goes on there to see if it's my driver code that needs adjusting.
  • b

    bright-gpu-74537

    08/09/2022, 9:33 PM
    hmmmmpf
  • l

    loud-salesclerk-7438

    08/09/2022, 9:41 PM
    I guess I'll have to update my code handling
    findComponentUnderPoint
    results, because the order has changed in latest git. so that part is on me. not sure if that explains all the things, but probably some of them
  • l

    loud-salesclerk-7438

    08/09/2022, 9:43 PM
    which leads to the question, do people in need of ui tests run with git HaxeUI or do they use older versions?
  • r

    refined-cat-44047

    08/09/2022, 9:55 PM
    I am using
    @:bind
    to listen to the click event of a button. I got this from a HaxeUI example somewhere. Here is my code:
    Copy code
    @:bind(playBtn, MouseEvent.CLICK)
    private function playBtn_onClick(e){
        // Play sound
    }
    But where can I find more information about what "bind" is? The haxe docs just say "Override SWF class declaration. - flash" (https://haxe.org/manual/cr-metadata.html), but that doesn't sound like the full story. The class where this code is, also has the
    @:build
    for the XML layout, so does that work with bind somehow?
  • b

    best-agent-85158

    08/09/2022, 10:36 PM
    can the color picker support alpha values too?
  • b

    best-agent-85158

    08/09/2022, 10:37 PM
    its more of a feature request, but kind of a deal breaker for me
  • l

    loud-salesclerk-7438

    08/10/2022, 12:47 AM
    good news: after fixing a few things in my tests and adjusting to the new sorting order of
    findComponentsUnderPoint
    the tests work again (with haxeui git versions). and it seems like the TabBar/TabView issue is also gone, so probably a bug in 1.4.0 that was fixed at some point.
  • l

    loud-salesclerk-7438

    08/10/2022, 12:47 AM
    syncValidation issue still happening
  • b

    bright-gpu-74537

    08/10/2022, 6:30 AM
    great
  • b

    bright-gpu-74537

    08/10/2022, 6:30 AM
    hard to know what the cause of this is without a minimal repro, my money is on something to do with threading
  • b

    bright-gpu-74537

    08/10/2022, 6:32 AM
    it doesnt currently... its on a list to add but i was a little "coloured out" after the colour picker - you could always just add your own alpha slider or something like until i manage to get round to it - or yeah, if its a deal breaker, just dont use it until it get round to it
  • b

    bright-gpu-74537

    08/10/2022, 6:35 AM
    so, @bind is the one that haxe has - i didnt know what one existed when i made haxeui's bind... but they are totally unrelated. HaxeUIs @bind basically links up and event for you, so:
    Copy code
    haxe
    @bind(someObject, SomeEventClass.SOME_EVENT)
    function onSomeEvent(_) {
    }
    Will essentually put the following the component constructor:
    Copy code
    haxe
    someObject.registerEvent(SomeEventClass.SOME_EVENT, onSomeEvent)
    Thats about it Any yeah, @:bind wont work without @:build
  • r

    refined-cat-44047

    08/10/2022, 6:38 AM
    Fantastic! Thanks for the explanation 🙂
  • b

    bright-gpu-74537

    08/10/2022, 6:40 AM
    actually, i think im wrong also, i dont think it is limited by the build macros, i think you can just use @:bind anywhere on any component and it'll work (i should probably remember that more often myself)
  • b

    best-agent-85158

    08/10/2022, 7:44 AM
    no pressure, implement it whenever you can 🙂 The problem i had that made me realize it doesnt support alpha is passing a
    0x00000000
    bg color, which turned the color picker red...
  • b

    bright-gpu-74537

    08/10/2022, 7:47 AM
    i think when i do implement it, i might have a seperate property for alpha... ie, "currentAlpha", "currentColor"
  • b

    best-agent-85158

    08/10/2022, 7:50 AM
    make currentAlpha a
    (get, set)
    and just return
    selectedItem & 0xFF
    ?
  • b

    best-agent-85158

    08/10/2022, 7:52 AM
    another thing - i think the text is a bit too small - is there a way to resize it?
  • b

    bright-gpu-74537

    08/10/2022, 7:55 AM
    so these are the styles or the color picker: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/_module/styles/default/colorpickers.css but they also use these: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/_module/styles/default/main.css#L53-L63
  • b

    bright-gpu-74537

    08/10/2022, 7:56 AM
    not sure yet, i think selectedItem will probably return the alpha also, but two properties for color and alpha separately... not sure yet, will have to see
  • b

    best-agent-85158

    08/10/2022, 8:05 AM
    you can also just return selected item as
    Copy code
    haxe
    selectedItem &= 0x00ffffff;
    selectedItem|= alpha << 24;
  • b

    best-agent-85158

    08/10/2022, 8:05 AM
    if alpha is 255, it should return
    0xFF......
  • b

    bright-gpu-74537

    08/10/2022, 8:15 AM
    yeah, im just thinking out loud that it could be useful to have a separate alpha / color prop for some things, but selectedItem should probably include alpha also, as you said, you can always strip off the alpha if needed, will have to think whats more common / useful
  • b

    bright-gpu-74537

    08/10/2022, 8:15 AM
    in fact thinking about it... probably an "includeAlpha" property is the most useful, if that is false a) you wont see the alpha UI and b) it wont be returned in selectedItem
  • b

    best-agent-85158

    08/10/2022, 8:30 AM
    you could just add
    getRGB
    or
    getARGB
    etc
  • b

    bright-gpu-74537

    08/10/2022, 8:31 AM
    i think selectedItem will return a Color anyway
  • b

    best-agent-85158

    08/10/2022, 8:46 AM
    found a bug in the color picker - if you move the white selector outside of the color picker, things start to glich out
  • b

    best-agent-85158

    08/10/2022, 8:46 AM
    let me record for a moment
1...120612071208...1687Latest