https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • np... it actually was a deeper issue in haxeui-flixel, so ive left a note there to revise it at some point and maybe totally remove the code rather than "switching it off"
    b

    bright-gpu-74537

    04/02/2023, 12:38 PM
    np... it actually was a deeper issue in haxeui-flixel, so ive left a note there to revise it at some point and maybe totally remove the code rather than "switching it off"
  • https://github.com/haxeui/haxeui-flixel/commit/f1302c1826e61fe3ee91aaf5b067dca9228b5916
    b

    bright-gpu-74537

    04/02/2023, 12:38 PM
    https://github.com/haxeui/haxeui-flixel/commit/f1302c1826e61fe3ee91aaf5b067dca9228b5916
  • another question, about the recent locale support this time: where is the .properties file meant to be stored?
    i

    icy-zebra-52882

    04/02/2023, 2:26 PM
    another question, about the recent locale support this time: where is the .properties file meant to be stored?
  • does it have the be the same folder as the view XML, or specific folder?
    i

    icy-zebra-52882

    04/02/2023, 2:27 PM
    does it have the be the same folder as the view XML, or specific folder?
  • or how do I set up the locale manager with .properties data in the first place? There's `LocaleManager.instance.addStrings(localeId:String, map<String,String>, filename:String = null)` but I'm not sure what the map is meant to be if I'm loading from the file
    i

    icy-zebra-52882

    04/02/2023, 2:34 PM
    or how do I set up the locale manager with .properties data in the first place? There's
    LocaleManager.instance.addStrings(localeId:String, map<String,String>, filename:String = null)
    but I'm not sure what the map is meant to be if I'm loading from the file
  • https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/module.xml#L15-L49
    b

    bright-gpu-74537

    04/02/2023, 2:35 PM
    https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/module.xml#L15-L49
  • do I have to manually make it parse the strings and set the language?
    i

    icy-zebra-52882

    04/02/2023, 2:38 PM
    do I have to manually make it parse the strings and set the language?
  • nope...
    b

    bright-gpu-74537

    04/02/2023, 2:38 PM
    nope...
  • I've tried `haxe.ui.locale.LocaleManager.instance.language = "en";` but it still shows the keys as text
    i

    icy-zebra-52882

    04/02/2023, 2:38 PM
    I've tried
    haxe.ui.locale.LocaleManager.instance.language = "en";
    but it still shows the keys as text
  • you'll have to supply an example
    b

    bright-gpu-74537

    04/02/2023, 2:39 PM
    you'll have to supply an example
  • so I have this in my view XML: ```xml <button text="{{UI.gotoFirstPage}}" id="firstPageButton" /> ``` and the view create function has the above LocaleManager code to try to set `en.properties` as the source
    i

    icy-zebra-52882

    04/02/2023, 2:40 PM
    so I have this in my view XML:
    Copy code
    xml
    <button text="{{UI.gotoFirstPage}}" id="firstPageButton" />
    and the view create function has the above LocaleManager code to try to set
    en.properties
    as the source
  • http://haxeui.org/builder/?3f0fb3fb
    b

    bright-gpu-74537

    04/02/2023, 2:40 PM
    http://haxeui.org/builder/?3f0fb3fb
  • I set up a module.xml like you said, in the project dir
    i

    icy-zebra-52882

    04/02/2023, 2:41 PM
    I set up a module.xml like you said, in the project dir
  • or should it be in /src/?
    i

    icy-zebra-52882

    04/02/2023, 2:41 PM
    or should it be in /src/?
  • module needs to be on the classpath, so yeah, src
    b

    bright-gpu-74537

    04/02/2023, 2:41 PM
    module needs to be on the classpath, so yeah, src
  • also, any dirs you reference in the <locales> section need to be setup in the <resources> section also, eg: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/module.xml#L8
    b

    bright-gpu-74537

    04/02/2023, 2:42 PM
    also, any dirs you reference in the section need to be setup in the section also, eg: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/module.xml#L8
  • ah that was it, thought it would parse the path from locales tag in module.xml
    i

    icy-zebra-52882

    04/02/2023, 2:44 PM
    ah that was it, thought it would parse the path from locales tag in module.xml
  • now it shows english 🥳
    i

    icy-zebra-52882

    04/02/2023, 2:44 PM
    now it shows english 🥳
  • 🥳
    b

    bright-gpu-74537

    04/02/2023, 2:44 PM
    🥳
  • is text treated as unicode in wxWidgets by default?
    i

    icy-zebra-52882

    04/02/2023, 3:00 PM
    is text treated as unicode in wxWidgets by default?
  • only asking because trying to put a unicode emoji in a button label doesn't go well ⏮ https://plzlookat.mystupid.pictures/ZVypwWHiKK.png
    i

    icy-zebra-52882

    04/02/2023, 3:01 PM
    only asking because trying to put a unicode emoji in a button label doesn't go well ⏮

    https://plzlookat.mystupid.pictures/ZVypwWHiKK.png▾

  • im not sure tbh...
    b

    bright-gpu-74537

    04/02/2023, 3:20 PM
    im not sure tbh...
  • also, I can't get `<menuitem>` to run a callback when bound with `@:bind(myMenuItem, MouseEvent.CLICK)`
    i

    icy-zebra-52882

    04/02/2023, 3:58 PM
    also, I can't get
    <menuitem>
    to run a callback when bound with
    @:bind(myMenuItem, MouseEvent.CLICK)
  • not sure if this is a haxeui-hxwidgets specific thing though
    i

    icy-zebra-52882

    04/02/2023, 3:59 PM
    not sure if this is a haxeui-hxwidgets specific thing though
  • menu dont work like that, you need to use MenuEvent.MENU_SELECTED (i think thats right) on the menubar... this is especially important for native where the menubars are verrrry specialised native items (they arent even windows in wx)
    b

    bright-gpu-74537

    04/02/2023, 4:18 PM
    menu dont work like that, you need to use MenuEvent.MENU_SELECTED (i think thats right) on the menubar... this is especially important for native where the menubars are verrrry specialised native items (they arent even windows in wx)
  • ah I couldn't find that on the component explorer page for menus, thanks
    i

    icy-zebra-52882

    04/02/2023, 4:20 PM
    ah I couldn't find that on the component explorer page for menus, thanks
  • http://haxeui.org/explorer/#containers/menus
    b

    bright-gpu-74537

    04/02/2023, 4:21 PM
    http://haxeui.org/explorer/#containers/menus
  • but thats actually not very helpful for native which is much more stric
    b

    bright-gpu-74537

    04/02/2023, 4:21 PM
    but thats actually not very helpful for native which is much more stric
  • the best I could find in there is the example of the Box with MouseEvent.CLICK bind
    i

    icy-zebra-52882

    04/02/2023, 4:22 PM
    the best I could find in there is the example of the Box with MouseEvent.CLICK bind
  • hence why I thought it was that one
    i

    icy-zebra-52882

    04/02/2023, 4:22 PM
    hence why I thought it was that one
1...161316141615...1687Latest