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

    icy-zebra-52882

    07/16/2022, 12:05 PM
    yeah, does it use the one passed down from lime/openFL?
  • b

    bright-gpu-74537

    07/16/2022, 12:05 PM
    i believe so yeah - i remember it being backend specific
  • b

    bright-gpu-74537

    07/16/2022, 12:05 PM
    just looking for it now
  • i

    icy-zebra-52882

    07/16/2022, 12:07 PM
    hang on, think I found it,
    haxe/ui/locale/LocaleManager
  • b

    bright-gpu-74537

    07/16/2022, 12:07 PM
    yeah, im just trying to see how it detects the locale
  • i

    icy-zebra-52882

    07/16/2022, 12:09 PM
    there's a call to
    parseResource
    in
    ModuleMacros
    that seems to do something with it
  • b

    bright-gpu-74537

    07/16/2022, 12:09 PM
    So
    Platform.getSystemLocale()
    is the call, but i cant actually see it used anywhere
  • b

    bright-gpu-74537

    07/16/2022, 12:10 PM
    i think, for now, you have to set it manualy
  • b

    bright-gpu-74537

    07/16/2022, 12:10 PM
    ie:
    LocaleManager.instance.language = Platform.getSystemLocale()
  • i

    icy-zebra-52882

    07/16/2022, 12:12 PM
    where do the strings for different languages come from?
  • i

    icy-zebra-52882

    07/16/2022, 12:12 PM
    just trying to understand how it works
  • i

    icy-zebra-52882

    07/16/2022, 12:12 PM
    and for extensibility purposes if haxeUI is relying on something that doesn't have built-in support for whatever language is needed
  • i

    icy-zebra-52882

    07/16/2022, 12:16 PM
    there's this bit in `ModuleMacros.hx`:
    Copy code
    hx
    for (l in m.locales) {
        var localeId = l.id;
        if (localeId == null) {
            continue;
        }
        for (r in l.resources) {
            if (r != null) {
                builder.add(macro
                    haxe.ui.locale.LocaleManager.instance.parseResource($v{localeId}, $v{r})
                );
            }
        }
    }
    and scrolling further up it gets
    m
    from
    _modules
  • i

    icy-zebra-52882

    07/16/2022, 12:16 PM
    so it seems to be getting locale data at compile time with macros?
  • b

    best-agent-85158

    07/16/2022, 12:35 PM
    i stopped making my installer and got back to making my app (EZWorksheet) - i forgot how pleasent haxeui is to use
  • b

    best-agent-85158

    07/16/2022, 12:35 PM
    just so comfortable
  • b

    best-agent-85158

    07/16/2022, 12:35 PM
    + programming that with haxe
  • b

    best-agent-85158

    07/16/2022, 12:35 PM
    just hits different, expecially after all of the disgusting JS i needed to make a bubble background
  • b

    best-agent-85158

    07/16/2022, 12:36 PM
    im lucky to now a good bit of trigonometry, thta made the thing waayyyy easier, but still, annoying
  • b

    bright-gpu-74537

    07/16/2022, 1:01 PM
    yeah, so they are defined by modules
  • b

    bright-gpu-74537

    07/16/2022, 1:01 PM
    https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/module.xml#L11-L35
  • b

    bright-gpu-74537

    07/16/2022, 1:02 PM
    https://github.com/haxeui/haxeui-core/tree/master/haxe/ui/_module/locale
  • b

    best-agent-85158

    07/16/2022, 7:00 PM
    wait, what are those locales?
  • b

    best-agent-85158

    07/16/2022, 7:00 PM
    do they decide layout and positional data or just translate stuff?
  • b

    bright-gpu-74537

    07/16/2022, 9:48 PM
    they dont (by default) do anything about positioning stuff, though you could implement it based on the localemanager presumably, they basically just string replace based on language
  • b

    bright-gpu-74537

    07/16/2022, 9:49 PM
    but like the date format, or decimal format one, you can kinda "do anything" with the result translated string
  • i

    icy-zebra-52882

    07/17/2022, 3:37 PM
    another event-related bug in haxeui-flixel: steppers don't cancel touch scrolling and can't be touch-scrolled themselves (but clicking on a spot on the slider bar activates it to that spot correctly)
  • i

    icy-zebra-52882

    07/17/2022, 3:37 PM
    https://plzlookat.mystupid.pictures/Code_aI1m5FyUuy.mp4
  • i

    icy-zebra-52882

    07/17/2022, 3:38 PM
    not sure if -core or -flixel bug though
  • b

    bulky-exabyte-6537

    07/17/2022, 9:33 PM
    the music goes well with that 😅
1...117211731174...1687Latest