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

    purple-businessperson-14467

    03/09/2023, 8:53 PM
    somethin gin the module I assume (something not some thin gin)
  • b

    bright-gpu-74537

    03/09/2023, 8:54 PM
    you can defo exclude things based on conditions... "if" and "unless" in module.xml... core has an example of this
  • p

    purple-businessperson-14467

    03/09/2023, 8:54 PM
    cool, I thought so, thanks
  • b

    bright-gpu-74537

    03/09/2023, 8:54 PM
    https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/module.xml#L3-L9
  • p

    purple-businessperson-14467

    03/09/2023, 8:55 PM
    if I dont include an extension in the icon="item" it doesnt find closest item I assume
  • b

    bright-gpu-74537

    03/09/2023, 8:55 PM
    so the "exclude" will... well, exclude, things... and that (like any node in a module.xml or ui xml) can be conditionally evaluated
  • b

    bright-gpu-74537

    03/09/2023, 8:56 PM
    this is actually where i was thinking for this... like you just go "" and then, somehow, it will pick svg, or png, or maybe some other conditions... but i need to think about it
  • b

    bright-gpu-74537

    03/09/2023, 8:57 PM
    but the simple answer is no, not currently, currently resource names are file names
  • b

    bright-gpu-74537

    03/09/2023, 8:57 PM
    there is an asset plugin system but im not sure it will work in this way
  • p

    purple-businessperson-14467

    03/09/2023, 8:58 PM
    right, ok I was thinking something like
  • p

    purple-businessperson-14467

    03/09/2023, 8:58 PM
    anyways, I can make do for now
  • b

    bright-gpu-74537

    03/09/2023, 8:59 PM
    oh, i see, like a filter of what to include?
  • p

    purple-businessperson-14467

    03/09/2023, 8:59 PM
    what to include and maybe to use the ext when finding
  • b

    bright-gpu-74537

    03/09/2023, 8:59 PM
    thats not going to get rid of you static var though, is it?
  • b

    bright-gpu-74537

    03/09/2023, 8:59 PM
    hmmmm, right, yeah... its quite esoteric though
  • p

    purple-businessperson-14467

    03/09/2023, 9:00 PM
    ya, true
  • b

    bright-gpu-74537

    03/09/2023, 9:01 PM
    i think an asset plugin in a nicer idea... i just have to remember how they work... iirc, before an asset name is looked up, it passes through a list of optional plugins that can change that name
  • b

    bright-gpu-74537

    03/09/2023, 9:01 PM
    (this was primarily for kha)
  • b

    bright-gpu-74537

    03/09/2023, 9:02 PM
    so, you could so something like
    <resource-plugin id="addSuffix" suffix=".png" unless="html" />
    ... ...
    <resource-plugin id="addSuffix" suffix=".svg" if="html" />
  • p

    purple-businessperson-14467

    03/09/2023, 9:03 PM
    well could it filter the include and make it findable by image and image.png
  • b

    bright-gpu-74537

    03/09/2023, 9:03 PM
    then you do
    <image resource="foo/bar/myImage" />
    and it would add the suffix
  • p

    purple-businessperson-14467

    03/09/2023, 9:03 PM
    that would work yes
  • b

    bright-gpu-74537

    03/09/2023, 9:03 PM
    it feels more flexible... maybe more complex though...
  • p

    purple-businessperson-14467

    03/09/2023, 9:03 PM
    it was harder to grep for me but...idk
  • b

    bright-gpu-74537

    03/09/2023, 9:05 PM
    true, but the other way is "magic" and im not sure this is a "standard" use case... is it? I mean, it seems like adding magic for "this edge case" is hmmmmm, whereas adding a system (maybe more complex / flexible) that can work around this edge case (and others) feels more right... dunno... will have to think
  • b

    bright-gpu-74537

    03/09/2023, 9:07 PM
    like, what if all your resources were named .ang (for some reason) and you couldnt be bothered to rename them (for some reason)... would it make sense to add a "rename" into the resource system or a "rename" as a plugin? I think probably the latter
  • p

    purple-businessperson-14467

    03/09/2023, 9:07 PM
  • p

    purple-businessperson-14467

    03/09/2023, 9:08 PM
    byteme not being legitimate extension mind you
  • b

    bright-gpu-74537

    03/09/2023, 9:08 PM
    you forgot:
    <... splitBy="," replace3rdIndexWith="bob" />
  • p

    purple-businessperson-14467

    03/09/2023, 9:08 PM
    lol
1...159215931594...1687Latest