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

    bright-gpu-74537

    09/28/2022, 5:58 PM
    yeah, didnt really think about it, but yeah, image.resource uses ImageLoader and, i presume, so does canvasgraphics.image
  • b

    best-agent-85158

    09/28/2022, 5:58 PM
    no
    getPixel
    tho (and i cant seem to find an array of bytes too)
  • b

    bright-gpu-74537

    09/28/2022, 5:59 PM
    so yeah, there is no getPixel, and no getPixels either...
  • b

    bright-gpu-74537

    09/28/2022, 5:59 PM
    not yet anyway
  • b

    bright-gpu-74537

    09/28/2022, 5:59 PM
    i need to see how best to implement them across the backends (or maintain a buffer internally maybe, which id like to avoid)
  • p

    powerful-morning-89

    09/28/2022, 6:09 PM
    Nope, #596744553030090880:
  • b

    bright-gpu-74537

    09/28/2022, 6:09 PM
    oooo, nice one, thanks muchly 🙂
  • w

    witty-island-52596

    09/29/2022, 2:44 AM
    in haxeui-flixel how do i change the graphic of an image to a specific bitmapData? I tried
    userIcon.loadGraphic(bmd)
    but that didn't work because it's a FlxSpriteGroup
  • w

    witty-island-52596

    09/29/2022, 2:45 AM
    i'm using a bitmapData instance because I had to load from an external url given at runtime
  • w

    witty-island-52596

    09/29/2022, 2:50 AM
    tried setting resource to http://apifiles.ngfiles.com/medals/47000/47215/53995_easy.webp and it froze
  • w

    witty-island-52596

    09/29/2022, 2:52 AM
    can't set resource to the bitmapData instance either
  • w

    witty-island-52596

    09/29/2022, 3:22 AM
    this worked but probably not what I'm supposed to do
    Copy code
    hx
    var imageBg = userIcon.members[0];
    var image = userIcon.members[1];
    image.loadGraphic(bmd);
    image.setGraphicSize(Std.int(imageBg.width), Std.int(imageBg.height));
    image.updateHitbox();
  • b

    bright-gpu-74537

    09/29/2022, 5:58 AM
    have you tried
    myImage.resource = myBitmapData
    ?
  • b

    bright-gpu-74537

    09/29/2022, 5:59 AM
    i cant remember what ImageData resolved to in haxeui-flixel
  • b

    bright-gpu-74537

    09/29/2022, 5:59 AM
    typedef ImageData = flixel.graphics.frames.FlxFrame;
  • w

    witty-island-52596

    09/29/2022, 5:53 PM
    FlxFrame is an odd choice
  • b

    bright-gpu-74537

    09/29/2022, 5:54 PM
    yeah? I dont even remember why it was a choice, i think it was maybe a legacy thing from the backend @brave-kangaroo-30399 originally wrote
  • b

    bright-gpu-74537

    09/29/2022, 5:55 PM
    what is a better choice? FlxSprite maybe?
  • w

    witty-island-52596

    09/29/2022, 6:03 PM
    FlxGraphic maybe, or just a bitmapData
  • w

    witty-island-52596

    09/29/2022, 6:04 PM
    i can just set resource to the remote url
  • w

    witty-island-52596

    09/29/2022, 6:04 PM
    that makes this all much easier
  • w

    witty-island-52596

    09/29/2022, 6:05 PM
    a FlxFrame might not be dumb, I just don't use that often
  • w

    witty-island-52596

    09/29/2022, 6:10 PM
    maybe unrelated, but the urls I get from the server are in this format "//apifiles.ngfiles.com/medals/47000/47215/54000_difficult.webp" openfl's
    BitmapData.loadFromFile
    works with this but for haxeui-flixel I need to prepend "http:"
  • w

    witty-island-52596

    09/29/2022, 6:10 PM
    honestly im confused why openfl works without it, and I don't know why the server doesn't include it
  • w

    witty-island-52596

    09/29/2022, 6:27 PM
    I see fadeIn and out but how do i hide/show something instantly? I tried visible=false
  • w

    witty-island-52596

    09/29/2022, 6:29 PM
    i have components i want hidden at the start that will fadeIn later when the right data is loaded.
  • b

    bright-gpu-74537

    09/29/2022, 6:39 PM
    visible should have worked, i thought i overrode them in from flixel (maybe not), failing that you can try
    hidden
  • f

    full-journalist-82607

    09/29/2022, 6:59 PM
    You can also try opacity=0
  • w

    witty-island-52596

    09/29/2022, 7:10 PM
    back to images. i have
    Copy code
    xml
    <image id="medalIcon" resource="haxeui-core/styles/default/haxeui.png" width="50" height="50" scaleMode="fitheight"/>
    and i set resource to an image that is 100x100, that I want displayed at 50x50, but it turns out like this
  • w

    witty-island-52596

    09/29/2022, 7:11 PM
    it's actually a grid of
    Copy code
    xml
    <box width="50" height="50">
        <image id="medalIcon" resource="haxeui-core/styles/default/haxeui.png" width="50" height="50"/>
        <image id="lock" resource="Assets/images/lock.png" verticalAlign="bottom" horizontalAlign="right"/>
    </box>
1...128812891290...1687Latest