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

    refined-greece-48002

    02/26/2023, 8:18 AM
    correct
  • b

    bright-gpu-74537

    02/26/2023, 8:18 AM
    showing 3d stuff?
  • r

    refined-greece-48002

    02/26/2023, 8:18 AM
    it was an example; it's not actually a modelling app 😅
  • b

    bright-gpu-74537

    02/26/2023, 8:19 AM
    haha, gotcha 🙂
  • r

    refined-greece-48002

    02/26/2023, 8:19 AM
    but if I'm editing a property and select text and hit 'delete', it also deletes whatever is selected in the canvas's state, is the issue
  • b

    bright-gpu-74537

    02/26/2023, 8:19 AM
    yeah, sounds like a pretty compelling argument to make it interactive
  • r

    refined-greece-48002

    02/26/2023, 8:20 AM
    so I need to know whether the user has last clicked on the canvas or has focused elsewhere...and that includes if they for example pressed ctrl+o to bring up an "open file" dialog etc, so i can't just rely on naive click position checks etc
  • b

    bright-gpu-74537

    02/26/2023, 8:21 AM
    lemme have a think about, just woke up, need to get some food etc... but im thinking it probably doesnt hurt to make canvas extend InteractiveComponent, and maybe even make "allowFocus" false to start with
  • r

    refined-greece-48002

    02/26/2023, 8:23 AM
    I appreciate it, and absolutely no rush of course :)
  • b

    bright-gpu-74537

    02/26/2023, 8:23 AM
    np
  • b

    brave-kangaroo-30399

    02/26/2023, 11:38 AM
    @bright-gpu-74537 were you looking for sprites for animation or animation handling code?
  • b

    bright-gpu-74537

    02/26/2023, 12:35 PM
    either / both... just wanted to see an example of something i could use as a "custom image handler" thingy
  • b

    brave-kangaroo-30399

    02/26/2023, 12:50 PM
    https://github.com/MSGhero/mono2D/blob/main/mono/animation/AnimRequest.hx
  • b

    brave-kangaroo-30399

    02/26/2023, 12:51 PM
    So ultimately I think it would take an array of strings, maybe let the backend convert strings to Tile/FlxFrame/etc
  • b

    brave-kangaroo-30399

    02/26/2023, 12:52 PM
    With the atlas/spritesheet(s) defined in Toolkit init
  • b

    brave-kangaroo-30399

    02/26/2023, 12:52 PM
    And then any anim parameters like fps, etc
  • b

    bright-gpu-74537

    02/26/2023, 12:52 PM
    interesting... whats "Spritesheet"?
  • b

    bright-gpu-74537

    02/26/2023, 12:53 PM
    nvm
  • b

    bright-gpu-74537

    02/26/2023, 12:53 PM
    got it
  • b

    bright-gpu-74537

    02/26/2023, 12:56 PM
    so i think, as for some custom handler, you would handle that in your image handler however you want, something like:
    <image resource="animation://frame1;frame2;frame3?spritesheet=myspritesheet&loopPoint=8">
    or
    <image resource="animation://some_pre_packaged_animation_id>
  • b

    bright-gpu-74537

    02/26/2023, 12:57 PM
    ie, haxeui would lookup "animation" and run your handler and just pass to that
    frame1;frame2;frame3?spritesheet=myspritesheet&loopPoint=8
    or
    some_pre_packaged_animation_id
  • b

    brave-kangaroo-30399

    02/26/2023, 12:57 PM
    That makes sense
  • b

    bright-gpu-74537

    02/26/2023, 12:58 PM
    its a neat idea, for sure... super flexible
  • b

    brave-kangaroo-30399

    02/26/2023, 12:58 PM
    Does it make sense to keep it kinda generic and let the backend handle
    animation:
    as well?
  • b

    bright-gpu-74537

    02/26/2023, 12:58 PM
    i have a sparrow player for haxeui-flixel i wrote ages ago, would be interesting to see how i could integrate that also
  • b

    bright-gpu-74537

    02/26/2023, 12:59 PM
    well, i would need to extract that part to know which handler to call... "http", "file", "resource" (default), "sparrow", "animation", etc
  • b

    bright-gpu-74537

    02/26/2023, 12:59 PM
    so the backend (or your app) would register different handlers in a module.xml...
  • b

    bright-gpu-74537

    02/26/2023, 1:00 PM
    core would expose "the normal ones", haxeui-flixel would expose the sparrow one, your app could expose the "animation" one, etc
  • b

    bright-gpu-74537

    02/26/2023, 1:03 PM
    an eg of what i would expect haxeui-core to have in its module.xml after:
  • b

    bright-gpu-74537

    02/26/2023, 1:03 PM
    Copy code
    xml
    <image-loaders>
        <image-loader prefix="resource" class="haxe.ui.core.loaders.image.ResourceLoader" default="true" />
        <image-loader prefix="http" class="haxe.ui.core.loaders.image.HttpLoader" />
        <image-loader prefix="file" class="haxe.ui.core.loaders.image.FileLoader" />
    </image-loaders>
1...153715381539...1687Latest