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

    bright-gpu-74537

    09/07/2022, 3:18 PM
    (and explorer updated too)
  • c

    curved-appointment-82072

    09/07/2022, 3:33 PM
    Thank you Master!
  • c

    curved-appointment-82072

    09/07/2022, 3:36 PM
    Tested all good 👋
  • i

    icy-zebra-52882

    09/07/2022, 10:44 PM
    is there a way using haxeui-flixel to manually provide width and height bounds that haxeUI sees?
  • i

    icy-zebra-52882

    09/07/2022, 10:50 PM
    essentially I am trying to make my flixel game as aspect-ratio- and window-size-independent as I can, so that it can see and use all the space available as well on 16:10 as it can on 16:9
  • i

    icy-zebra-52882

    09/07/2022, 10:52 PM
    to that end, I'm using
    StageSizeScaleMode
    to let flixel see the actual window dimensions, and setting a scale factor based on the intended width and height of the game
  • i

    icy-zebra-52882

    09/07/2022, 10:53 PM
    originally I tried to use this scale factor with cameras, but I'm having issues there, and then I remembered
    Toolkit.scale
    for UI (which I tested drawing to a separate camera without changing the camera's zoom/scale factor)
  • i

    icy-zebra-52882

    09/07/2022, 10:54 PM
    it kind of works, in that haxeUI scales the UI with the new factor, but... it's really, really not pretty
  • i

    icy-zebra-52882

    09/07/2022, 10:54 PM
    nothing updates or redraws and the hitboxes are all over the place for haxeUI components
  • i

    icy-zebra-52882

    09/07/2022, 10:56 PM
    https://plzlookat.mystupid.pictures/Code_qoAkzpgshR.mp4
  • i

    icy-zebra-52882

    09/07/2022, 10:56 PM
    haxeUI really doesn't like the scale factor changing during runtime
  • i

    icy-zebra-52882

    09/07/2022, 11:01 PM
    maybe redraw existing components if
    Toolkit.scale
    changes?
  • i

    icy-zebra-52882

    09/07/2022, 11:18 PM
    it might be worth recalculating layouts when the scale factor is changed too, like when the stage is resized; at the moment, layouts don't take scaled width/height properly into account so you can end up with overlap, note the labels in these screenshots:

    https://plzlookat.mystupid.pictures/hl_Cklm9Yekqv.pngâ–¾

    https://plzlookat.mystupid.pictures/hl_dGedDiLRHW.pngâ–¾

  • h

    happy-agent-4114

    09/08/2022, 1:16 AM
    Not sure why but this only assigns the title without changing the icon
  • h

    happy-agent-4114

    09/08/2022, 1:16 AM
    I've tried with both icon.png and icon.ico
  • h

    happy-agent-4114

    09/08/2022, 1:18 AM
    app is defined as
    app = new HaxeUIApp();
  • e

    elegant-twilight-61392

    09/08/2022, 2:24 AM
    iirc windows doesnt support png for icons
  • e

    elegant-twilight-61392

    09/08/2022, 2:24 AM
    it might need to be ico
  • h

    happy-agent-4114

    09/08/2022, 4:37 AM
    It doesn't work with ico either
  • h

    happy-agent-4114

    09/08/2022, 4:45 AM
    I'm just waiting for Ian to wake up tbh
  • h

    happy-agent-4114

    09/08/2022, 4:46 AM
    He knows everything, it's like he wrote it
  • b

    bright-gpu-74537

    09/08/2022, 5:53 AM
    png should be fine, the code i wrote loads bitmap then converts to icon... is the .png available? I mean, is assets/icon.png packaged into the app so it can be read at runtime? does "file://assets/icon.png" work... or whatever the path would be relative to the .exe
  • h

    happy-agent-4114

    09/08/2022, 6:12 AM
    I'll try using an external file path
  • h

    happy-agent-4114

    09/08/2022, 6:16 AM
    actually I have a better test case
  • h

    happy-agent-4114

    09/08/2022, 6:16 AM
    I'm displaying the image in the window and using the same path in the app
  • h

    happy-agent-4114

    09/08/2022, 6:17 AM
    ok I feel like I'm doing something very wrong now
  • b

    bright-gpu-74537

    09/08/2022, 6:18 AM
    right, they actually go through two different "load paths"... one uses ImageLoader (Image does), and the other uses ToolkitAssets... ImageLoader also uses ToolkitAssets but also supports, http, file and ImageData... so i think i might change the .icon stuff to also use the ImageLoader (probably should have used that in the first place tbh 🙂 )
  • h

    happy-agent-4114

    09/08/2022, 6:18 AM
    if the icon is in
    {project folder}/assets/icon.png
    and the exe is in
    {project folder}/build/main.exe
    the right path to use for an external image would be
    ../assets/icon.png
    right?
  • b

    bright-gpu-74537

    09/08/2022, 6:20 AM
    yeah, but i wouldnt use a relative path like that, it will only break when you move things around, i would either a) use a module and embed resources into the exe or b) copy the image into the build folder
  • h

    happy-agent-4114

    09/08/2022, 6:21 AM
    I'm way too used to lime, how do I make the assets folder package into the exe
1...124912501251...1687Latest