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

    bright-gpu-74537

    02/21/2023, 12:57 PM
    so heaps can play gifs?
  • b

    bright-gpu-74537

    02/21/2023, 12:58 PM
    OK, so, i think ive fixed the batching, so you shouldnt need anymore workarounds or anything, it will detect if there is something that is going to break batching and adjust accordingly
  • e

    early-butcher-76809

    02/21/2023, 2:17 PM
    Seems so ! :D
  • b

    bright-gpu-74537

    02/21/2023, 2:20 PM
    interesting, wasnt aware of that
  • e

    early-butcher-76809

    02/21/2023, 3:12 PM
    Resizing doesn't work, though, they break. Still animated but it's mixing frames in a weird way
  • b

    bright-gpu-74537

    02/21/2023, 3:15 PM
    using whatever heaps is using internally?
  • b

    bright-gpu-74537

    02/21/2023, 3:15 PM
    what does the code even look like for "heaps internal animated gif playing"?
  • f

    few-pizza-8232

    02/21/2023, 4:07 PM
    Does anyone know of any open-source work with HaxeUI to populate a PropertyGrid (or similar) from the fields of an anonymous structure? I think I can figure it out myself (with either Reflect or a little macro magic) but I'd be surprised if it hadn't been needed/helpful in other use cases and it'd be nice to reinvent a little less of that particular wheel (especially as both Reflect and macros have folded my brain in half with prior integration attempts) My use case is for easy prompt-form creation - I'm opening a window with confirm/cancel options and thought it'd be nice to have other systems interface with it by just writing something like
    Copy code
    typedef PromptableFields = {
      foo:Int,
      bar:String
    };
    
    class PromptUtilizer {
      function startRequest() {
        PromptWindow.show<PromptableFields>(handlePromptResponse);
      }
    
      function handlePromptResponse(p:PromptableFields) {
        // callback logic
      }
    }
    That doesn't cover stuff like list-type fields, but something like this would make for much more reusable code (albeit more homogenous menu interfaces).
  • e

    early-butcher-76809

    02/21/2023, 4:12 PM
    Well, I don't know :D I just added the gif in the module.xml and it worked all by itself. I also tried way to load bytes the Heaps way to skip haxe.Resource, because I was curious to see if it was possible and it worked too. I didn't look for more once I had a way to make it works without changing haxeUI :P I've just seen that putting an animation inside a box smaller than the original gif size does crazy things. It does resize, sure, but it's like only parts of the image are rendered, like a tiling gone wrong (getting a 32px tiling of a 64px tileset, for example).
  • b

    bright-gpu-74537

    02/22/2023, 7:56 AM
    its not something im aware of if im honest, so, am i understanding that you basically wanna pass a typedef (or whatever) to some help class and it will populate a properties grid for you? (bi directional i would assume)
  • r

    refined-greece-48002

    02/22/2023, 11:21 AM
    I do something similar in my project but instead of promptable fields being an anonymous structure it's an array of enum values, and the property grid generator figures out what to build by matching on them.
  • f

    few-pizza-8232

    02/22/2023, 1:17 PM
    More or less. It seemed to me to be an appropriately "haxey" and low-friction way to have business logic talking with the UI - I thought it might have been done somewhere or another already. Not a feature request really
  • f

    few-pizza-8232

    02/22/2023, 1:19 PM
    That seems a lot easier to wrap my head around than decomposing the typedef into fields and translating those into property components. I might steal the approach for a first pass implementation and see if I can wrap what I'm thinking of around that later
  • b

    bright-gpu-74537

    02/22/2023, 2:30 PM
    rounded borders and gradients in haxeui-kha... 😮
  • a

    ambitious-knife-25690

    02/22/2023, 2:30 PM
    man that makes a difference
  • b

    bright-gpu-74537

    02/22/2023, 2:30 PM
    right?? Its kinda insane
  • a

    ambitious-knife-25690

    02/22/2023, 2:31 PM
    and some of the rounding is just a 2px curve 😂
  • b

    bright-gpu-74537

    02/22/2023, 2:31 PM
    the radii are so slight its unreal, but the overall effect its massive
  • b

    bright-gpu-74537

    02/22/2023, 2:32 PM
    without:
  • a

    ambitious-knife-25690

    02/22/2023, 2:33 PM
    its really funny how the sentiment changes
  • a

    ambitious-knife-25690

    02/22/2023, 2:34 PM
    rounding: some structure - but flexible no rounding: extra rigid and no flexibility
  • b

    bright-gpu-74537

    02/22/2023, 2:35 PM
    yeah, its also weird about a sort of implied "trust", i mean, i know its just rounded borders but i "trust" the slight rounded one a little more... maybe thats a dumb word, but something like that... maybe because it looks more polished and the implies someone cares... dunno
  • a

    ambitious-knife-25690

    02/22/2023, 2:36 PM
    well its kind of like paint colours right
  • a

    ambitious-knife-25690

    02/22/2023, 2:37 PM
    walk into a building with monotone/grey colours and it expresses a kind of dull/indifference sentiment
  • a

    ambitious-knife-25690

    02/22/2023, 2:37 PM
    got some splash of colours on the wall and it picks you up a bit, its more natural
  • b

    bright-gpu-74537

    02/22/2023, 2:38 PM
    yeah, its all super interesting really - im not really a "ui guy" (or at least wasnt), ive learnt so much about perception with haxeui... and bunch of other UI'y type stuff i just never thought about before haxeui
  • r

    refined-greece-48002

    02/22/2023, 2:39 PM
    Unless (and even if, really) you're pulling the anonymous structures from serialized data, I think the typing-with-enums thing is probably the Haxe-y way to do this sort of thing
  • r

    refined-greece-48002

    02/22/2023, 2:39 PM
    it's the same way hscript etc works
  • f

    few-pizza-8232

    02/22/2023, 2:47 PM
    Maybe not the most "haxey" approach then, but the kind of syntactic sugar to which anonymous structures seem to lend themselves
  • b

    bright-gpu-74537

    02/22/2023, 3:17 PM
    ... shadows too for a little "depth" 🙂
1...153315341535...1687Latest