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

    bright-gpu-74537

    03/04/2023, 3:45 PM
    and you put that +1 in the screen mapComponents, right?
  • a

    ambitious-knife-25690

    03/04/2023, 3:45 PM
    yeah both screen and comp
  • b

    bright-gpu-74537

    03/04/2023, 3:46 PM
    ok... your componentimpl mapComponents is done now... this is solely about screen now
  • b

    bright-gpu-74537

    03/04/2023, 3:46 PM
    your impl seems fine... i would make sure the values you are getting make sense in the loop
  • a

    ambitious-knife-25690

    03/04/2023, 3:47 PM
    what it seems like is the last added component, doesn't have its depth "set"
  • b

    bright-gpu-74537

    03/04/2023, 3:48 PM
    yeah, something like that
  • a

    ambitious-knife-25690

    03/04/2023, 3:48 PM
    component.visual.depth = this.rootComponents.length;
  • a

    ambitious-knife-25690

    03/04/2023, 3:49 PM
    doing this fixes it
  • a

    ambitious-knife-25690

    03/04/2023, 3:49 PM
    but this is odd, i'm calling mapComponents at the end
  • b

    bright-gpu-74537

    03/04/2023, 3:49 PM
    thats wrong though, for the reasons discussed before
  • a

    ambitious-knife-25690

    03/04/2023, 3:49 PM
    is addcomponents called at a different time to compimpl?
  • b

    bright-gpu-74537

    03/04/2023, 3:49 PM
    hang on... two secs
  • b

    bright-gpu-74537

    03/04/2023, 3:49 PM
    addComponent isnt adding to to the rootComponents
  • a

    ambitious-knife-25690

    03/04/2023, 3:50 PM
    Copy code
    hx
        public override function addComponent(component:haxe.ui.core.Component):haxe.ui.core.Component {
            @:privateAccess component.recursiveReady();
            var c = super.addComponent(component);
            resizeComponent(c);
            component.visual.active = true;
            component.visual.depth = this.rootComponents.length;
            App.app.scenes.main.add(c.visual);
    
            this.mapComponents();
            return c;
        }
  • a

    ambitious-knife-25690

    03/04/2023, 3:50 PM
    it is "wrong", but i'm calling mapComponents directly after so i'd assume.... oh 😄
  • b

    bright-gpu-74537

    03/04/2023, 3:51 PM
    you need a
    rootComponents.push(component)
    there... it isnt strictly required since Screen will also try to do it, but here it has to be there since you need it in the array in order to get the index
  • a

    ambitious-knife-25690

    03/04/2023, 3:52 PM
    okay yeah that fixed it
  • b

    bright-gpu-74537

    03/04/2023, 3:52 PM
    and that fixes the menubar?
  • a

    ambitious-knife-25690

    03/04/2023, 3:52 PM
    loads menus 👀
  • a

    ambitious-knife-25690

    03/04/2023, 3:53 PM
    hell yeah 😄
  • b

    bright-gpu-74537

    03/04/2023, 3:53 PM
    one down
  • a

    ambitious-knife-25690

    03/04/2023, 3:53 PM
    yes
  • a

    ambitious-knife-25690

    03/04/2023, 3:54 PM
    this is weird
  • a

    ambitious-knife-25690

    03/04/2023, 3:54 PM
    (the border on the menu)
  • b

    bright-gpu-74537

    03/04/2023, 3:54 PM
    ¯\_(ツ)_/¯
  • a

    ambitious-knife-25690

    03/04/2023, 3:58 PM
    altho, i should check some of those not working now 😄
  • b

    bright-gpu-74537

    03/04/2023, 3:59 PM
    i think once you fix the "base" issues... then you dont need a working / not working list... there is nothing special about components (from a backend perspective)
  • a

    ambitious-knife-25690

    03/04/2023, 4:00 PM
    i'm treating it less like a component list
  • a

    ambitious-knife-25690

    03/04/2023, 4:01 PM
    and more as a list of foundational things working/not working
  • b

    bright-gpu-74537

    03/04/2023, 4:01 PM
    cool cool
1...157315741575...1687Latest