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

    full-journalist-82607

    08/25/2022, 2:23 PM
    I found a difference between platforms. I'm not able to access tab-button image in openfl ( to change the scaleMode )
    Copy code
    for ( but in character_maker.findComponents("tabbar-button") ) {
                trace(but.childComponents); // is empty in openfl, works in js and raylib
                trace(but.findComponents(Image, 10)); // is empty in openfl, works in js and raylib
            }
  • b

    bright-gpu-74537

    08/25/2022, 2:40 PM
    where are you calling this code from?
  • f

    full-journalist-82607

    08/25/2022, 2:49 PM
    at initialisation @:bind(this, haxe.ui.events.UIEvent.INITIALIZE)
  • f

    full-journalist-82607

    08/25/2022, 2:49 PM
    ( or rendered)
  • b

    bright-gpu-74537

    08/25/2022, 2:50 PM
    i think, in openfl, things wait for an added to stage event, which means, that the INITIALIZE event isnt the right one... you might want to try the READY event
  • b

    bright-gpu-74537

    08/25/2022, 2:51 PM
    also, initialize doesnt mean that the component is ready (ie, has children, has done its layout etc)... it means its literally just create and is about to be ready
  • f

    full-journalist-82607

    08/25/2022, 2:52 PM
    Indeed ! Works with READY. ( But why wouldn't it work with RENDERED ? )
  • b

    bright-gpu-74537

    08/25/2022, 2:53 PM
    not sure what the rendered event is tbh
  • b

    bright-gpu-74537

    08/25/2022, 2:53 PM
    sounds like its old / legacy or in the wrong place
  • f

    full-journalist-82607

    08/25/2022, 2:53 PM
    Sorry RENDERER_CREATED
  • b

    bright-gpu-74537

    08/25/2022, 2:54 PM
    ah, thats for item renderers, well, actually its for things that create item renderers (like listview, tableviews, treeviews, etc)... should probably move that
  • f

    full-journalist-82607

    08/25/2022, 2:55 PM
    Ah okay, I thought it was when the component was ready and shown, it makes sense it didn't work 🙂
  • b

    bright-gpu-74537

    08/25/2022, 2:55 PM
    yeah, its probably in the wrong place to be fair
  • f

    full-journalist-82607

    08/25/2022, 2:57 PM
    Oh btw, I'm using this code because it seems you cannot modify the scaleMode in the css. think this feature is missing, but I don't know how they do in "real" css
  • b

    bright-gpu-74537

    08/25/2022, 2:59 PM
    hmmm, "transform:scale(2)" i think (which doesnt exist in haxeui css)
  • f

    full-journalist-82607

    08/25/2022, 3:03 PM
    the scaleMode is "fitinside" "fill" etc ...
  • b

    bright-gpu-74537

    08/25/2022, 3:04 PM
    hmmmm, right... maybe haxeui's version could be:
    transform: scale(fitinside)
  • b

    bright-gpu-74537

    08/25/2022, 3:04 PM
    (but either way, it doesnt exist yet anyway, so your only option is the way you are doing it)
  • f

    full-journalist-82607

    08/25/2022, 3:05 PM
    It seems in real css ( after ecosiaing a little) they have object-fit
  • f

    full-journalist-82607

    08/25/2022, 3:07 PM
    Yeah indeed, I need just need to replace my INITIALIZE with READY ! 😉 Going back to it 🙂
  • b

    bright-gpu-74537

    08/25/2022, 3:07 PM
    fyi, ive never once had to use the INITIALIZE event for anything
  • f

    full-journalist-82607

    08/25/2022, 3:28 PM
    Oh really ? I kind of use it instead of putting code inside a the new() function usually
  • b

    bright-gpu-74537

    08/25/2022, 3:46 PM
    i use "new" and "onReady"
  • e

    elegant-twilight-61392

    08/25/2022, 6:34 PM
    im getting cpp compiler errors while just doing
    import haxe.ui.HaxeUIApp;
    with haxeui-pdcurses
    Copy code
    Error: ./src/haxe/ui/backend/AppImpl.cpp: In member function 'virtual void haxe::ui::backend::AppImpl_obj::init(Dynamic, Dynamic)':
    ./src/haxe/ui/backend/AppImpl.cpp:63:33: error: 'PDC_set_title' was not declared in this scope
       63 | HXDLIN(  18)                    PDC_set_title(this1);
          |                                 ^~~~~~~~~~~~~
    Error: Build failed
  • b

    bright-gpu-74537

    08/25/2022, 6:37 PM
    git version?
  • e

    elegant-twilight-61392

    08/25/2022, 6:37 PM
    yeah
  • b

    bright-gpu-74537

    08/25/2022, 6:37 PM
    oh
  • e

    elegant-twilight-61392

    08/25/2022, 6:38 PM
    for both the core and the backend
  • b

    bright-gpu-74537

    08/25/2022, 6:40 PM
    works here
  • b

    bright-gpu-74537

    08/25/2022, 6:40 PM
    ... oh, hang on... are you on non-windows?
1...122112221223...1687Latest