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

    early-butcher-76809

    02/16/2023, 5:19 PM
    Oh, it's not just fonts, but it's the only resource that went me a message ^^
  • e

    early-butcher-76809

    02/16/2023, 5:19 PM
    It's not loading my images either :/
  • e

    early-butcher-76809

    02/16/2023, 5:19 PM
    Maybe I did smth wrong
  • b

    bright-gpu-74537

    02/16/2023, 5:20 PM
    what if you do:
    <image resource="haxeui-core/styles/default/haxeui.png" />
  • b

    bright-gpu-74537

    02/16/2023, 5:20 PM
    thats an image that is from the haxeui-core module
  • e

    early-butcher-76809

    02/16/2023, 5:21 PM
    Ah, this one works
  • b

    bright-gpu-74537

    02/16/2023, 5:21 PM
    so your module must be dodgey
  • b

    bright-gpu-74537

    02/16/2023, 5:22 PM
    (or in a bad location,
    module.xml
    needs to be on the classpath for haxeui to discover it)
  • e

    early-butcher-76809

    02/16/2023, 5:22 PM
    Yeah, the bad location was my previous issue, it took me some time to understand ^^'
  • b

    bright-gpu-74537

    02/16/2023, 5:22 PM
    lets have a peek at your module.xml
  • e

    early-butcher-76809

    02/16/2023, 5:22 PM
    Gonna check how it's done in the haxeui-core module
  • e

    early-butcher-76809

    02/16/2023, 5:28 PM
    When using ``resource_resolution_verbose`` I see all resources being loaded, including my images
  • e

    early-butcher-76809

    02/16/2023, 5:29 PM
    This one being the one I try : ``+ 'kenney/images/blue_checkmark.png``
  • e

    early-butcher-76809

    02/16/2023, 5:30 PM
    But when I use this image as button icon, it does not appear, AssetsImpl.getImageInternal telling me the file does not exist :/
  • e

    early-butcher-76809

    02/16/2023, 5:31 PM
    The thing is automated in the themes, is there a way around to get it to work ? Just loading manually the fonts on my side ?
  • b

    bright-gpu-74537

    02/16/2023, 5:32 PM
    getImageInternal is "internal to the framework" (ie, heaps), it should return null, which means next, it will call imageFromBytes (or getImageFromHaxeResource - i cant remember which)
  • e

    early-butcher-76809

    02/16/2023, 5:32 PM
    Ah !
  • e

    early-butcher-76809

    02/16/2023, 5:32 PM
    Gonna check what happens next, then. Thanks
  • b

    bright-gpu-74537

    02/16/2023, 5:35 PM
    im not sure i follow, whats automated in themes? Doesnt matter which way you cut it, fonts in haxeui-heaps need to be registered with heaps... maybe there is a way to load a font from bytes? But the fact the function override doesnt exist there makes me think its either not possible, or not easy (i could be wrong about both ofc 🙂 )
  • e

    early-butcher-76809

    02/16/2023, 5:44 PM
    Alright, ``Resource.listNames().indexOf(orginalResourceId)``, in ``ToolkitAssts.getImage``, is where they diverge. The haxeui icon is in this list, mine is not. I haven't figured out where is filled, though ^^'
  • b

    bright-gpu-74537

    02/16/2023, 5:46 PM
    Resource.listNames() lists all the haxe resources that have been compiled into the app, so yeah, it seems like something is off in your module
  • b

    bright-gpu-74537

    02/16/2023, 5:46 PM
    (its filled by a macro
    Context.addResource
    or something like that)
  • b

    bright-gpu-74537

    02/16/2023, 5:47 PM
    but you are saying that
    resource_resolution_verbose
    shows your resource being added, but then it isnt available in listNames() ?
  • e

    early-butcher-76809

    02/16/2023, 5:47 PM
    Yes
  • b

    bright-gpu-74537

    02/16/2023, 5:48 PM
    thats certainly odd... have to tried listing all of the names and seeing what is there?
  • b

    bright-gpu-74537

    02/16/2023, 5:49 PM
    for (n in Resource.listNames()) { trace(n): }
  • e

    early-butcher-76809

    02/16/2023, 5:49 PM
    Nope, doing it !
  • e

    early-butcher-76809

    02/16/2023, 5:51 PM
    Wait, I probably did smth wrong with the path, there are some images working, not the one I'm trying to do myself, though :D
  • e

    early-butcher-76809

    02/16/2023, 5:54 PM
    Holy shit, I'm an idiot. There's a typo 😬 I read, re-read- re-re-read it time and again and I didn't see it. My brain must be rotten. I'm so sorry :(
  • b

    bright-gpu-74537

    02/16/2023, 5:55 PM
    haha, no hassle, it happens... i remember spending literally about 2-3 hours looking at "trace(...)" in java and not being able to work out what was wrong
1...152015211522...1687Latest