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

    helpful-boots-41914

    04/24/2023, 4:20 PM
    Gotcha . . . well it did look nice haha. I guess I'll revert for now
  • b

    bright-gpu-74537

    04/24/2023, 4:24 PM
    so, in a perfect world, how would you foresee that working in haxeui? What would
    new HaxeUISubImage(khaTexture, frameX, frameY, frameW, frameH)
    be returning?
  • b

    bright-gpu-74537

    04/24/2023, 4:25 PM
    oh, sorry, misread, its not a function its a class
  • h

    helpful-boots-41914

    04/24/2023, 4:29 PM
    Right. If it isn't clear it would just keep texture and subimage information. It's probably not completely necessary, as you could just include the single images needed for HaxeUI outside of the atlas, but I was just seeing if this is reasonable or even existed.
  • b

    bright-gpu-74537

    04/24/2023, 4:30 PM
    i guess something could be added to the ImageDisplayImpl.hx in haxeui-kha - but im not sure what that would look like
  • b

    bright-gpu-74537

    04/24/2023, 4:31 PM
    then you could go:
    myHaxeUIImage.getImageDisplay().drawSubImage(...)
    (drawSubImage being a new function in haxeui-kha)
  • b

    bright-gpu-74537

    04/24/2023, 4:34 PM
    alternatively this could be a nice place to test out the extensible image loaders (described in the 1.6 notes), but i still dont know what it would actually look code wise under the hood... can you give me a (preferably working) example of your tilemap thing (without haxeui), the thing im "stuck" on is that under the hood, ImageDisplayImpl uses a kha.Image as buffer
  • b

    bright-gpu-74537

    04/24/2023, 4:36 PM
    actually, alright, i think i get it now, so if ImageDisplayImpl held info about the tilemap, and the cords, then this would also have to change to then draw that sub image: https://github.com/haxeui/haxeui-kha/blob/master/haxe/ui/backend/ComponentImpl.hx#L311-L317
  • h

    helpful-boots-41914

    04/24/2023, 4:37 PM
    Right something like
    DrawImage(this, x, y, w, h)
    right?
  • b

    bright-gpu-74537

    04/24/2023, 4:38 PM
    or drawsubimage, or whatever... the thing i wasnt understanding is, i was thinking it will still use the _buffer under the hood, but ofc, thats the whole point, you dont want that, so it will be another "type" of image really
  • h

    helpful-boots-41914

    04/24/2023, 4:40 PM
    I'm not sure how the buffer you're talking about works. I think you'd still supply the buffer but additional information on where on the buffer you'd draw in. But I don't know haxeuis internals enough to know if that's right
  • b

    bright-gpu-74537

    04/24/2023, 4:40 PM
    well, the _buffer is a kha.Image that gets loaded from assets and gets blitted as part of the renderTo
  • b

    bright-gpu-74537

    04/24/2023, 4:41 PM
    and i think you want to side step that altogether, i mean, i could reuse the _buffer variable, buts its now a ref to some "global" kha.Image, not one that is created by haxeui
  • b

    bright-gpu-74537

    04/24/2023, 4:42 PM
    do you have a tilemap to play with?
  • h

    helpful-boots-41914

    04/24/2023, 4:43 PM
    Yes I'll send you one
  • h

    helpful-boots-41914

    04/24/2023, 4:49 PM
    If you are considering adding this in - may I suggest adding support for supplying scale information? IE: you supply the resource with the subimage information and scaling information? Or do you think HaxeUI will work on the scale part of things?
  • b

    bright-gpu-74537

    04/24/2023, 4:52 PM
    yeah, im going to have a play, and yeah, i was defo going to add support for drawScaledSubImage
  • g

    gifted-whale-78169

    04/24/2023, 11:09 PM
    any idea on how i can keep these false errors from showing up? everything compiles but theyre kind of annoying(haxeui-openfl)

    https://cdn.discordapp.com/attachments/565569107701923852/1100196877443539104/image.png▾

  • g

    gifted-whale-78169

    04/24/2023, 11:09 PM
    everything is up to date
  • e

    elegant-twilight-61392

    04/24/2023, 11:10 PM
    they arent false in the context of the completion server
  • g

    gifted-whale-78169

    04/24/2023, 11:11 PM
    well then how can i make the completion server recognize haxeui?
  • e

    elegant-twilight-61392

    04/24/2023, 11:12 PM
    make sure that haxeui is actually included in the hxml that it uses
  • e

    elegant-twilight-61392

    04/24/2023, 11:12 PM
    since its openfl, the hxml is created from the project.xml
  • g

    gifted-whale-78169

    04/24/2023, 11:13 PM
    well the xml has haxeui added
  • e

    elegant-twilight-61392

    04/24/2023, 11:13 PM
    have you restarted vscode since adding it?
  • g

    gifted-whale-78169

    04/24/2023, 11:13 PM
    Copy code
    xml
        <haxelib name="haxeui-core" />
        <haxelib name="haxeui-openfl" />
  • g

    gifted-whale-78169

    04/24/2023, 11:13 PM
    yes
  • a

    ambitious-knife-25690

    04/24/2023, 11:13 PM
    did you recompile after adding them?
  • g

    gifted-whale-78169

    04/24/2023, 11:13 PM
    it was the same thing yesterday, im just now coming back to it
  • g

    gifted-whale-78169

    04/24/2023, 11:14 PM
    well ive ran
    openfl test html5
    , does that build it beforehand?
1...164616471648...1687Latest