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

    bright-gpu-74537

    06/12/2020, 8:32 AM
    i would always have to be the bottom most child though
  • b

    bright-gpu-74537

    06/12/2020, 8:32 AM
    as other components would be added on top of it
  • b

    bright-gpu-74537

    06/12/2020, 8:32 AM
    but there is likely functions to handle all that
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:32 AM
    what is the bottommost child?
  • b

    bright-gpu-74537

    06/12/2020, 8:33 AM
    well, i mean, say you have a vbox with a background image, that would, presumably be a Graphics added to the vbox Object
  • b

    bright-gpu-74537

    06/12/2020, 8:34 AM
    well, that vbox would also have buttons added to it (more Object's) but the background graphics Object would always need to be child index = 0
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:34 AM
    ok got it
  • b

    bright-gpu-74537

    06/12/2020, 8:35 AM
    i dont think that would be a problem, i mean, i dont KNOW that heaps has a setChildIndex, but im going to assume it probably does
  • b

    bright-gpu-74537

    06/12/2020, 8:40 AM
    so i guess the componentimp could have an array of Graphics objects, that will always be at least .length = 1 (for "normal" styles), if a different background image + image clip + image slice is detected then it makes a new one
  • b

    bright-gpu-74537

    06/12/2020, 8:40 AM
    in fact, maybe a map makes more sense and the key being the image+clip+slice
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:45 AM
    I used a container at index 0 that holds all the style Graphics
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:45 AM
    but the problem is that the "extra" object now seems to ruin the haxeui's hierachy
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:46 AM
    is there a way to tell haxeui there is always one base object so that stuff like
    numComponents
    should ignore that when counting?
  • b

    bright-gpu-74537

    06/12/2020, 8:47 AM
    num components should only report the number of components added via addComponent
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:47 AM
    It is a simple change and it is working (button hoverable) but the buttons in the background are gone
  • b

    bright-gpu-74537

    06/12/2020, 8:48 AM
    hmmmm... thats weird... its not an alpha issue is it?
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:49 AM
    nope
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:49 AM
    I have to check why...
  • b

    bright-gpu-74537

    06/12/2020, 8:52 AM
    right, fair enough, certainly seems strange, i mean, that yellow background is just another "overlay" component added to the Screen
  • b

    bright-gpu-74537

    06/12/2020, 8:52 AM
    so why that would remove the ones behind seems weird... especially as the dialog in the front seems fine (and thats pretty layered itself)
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:53 AM
    Current doing this: add a base style container in ComponentImpl then add Graphics to it in StyleHelper
  • b

    bright-gpu-74537

    06/12/2020, 8:53 AM
    .removeChildren maybe?
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:53 AM
    but the container only contains styles Graphics (supposed)
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:54 AM
    oh you mean haxeui maybe adding components to that index-0 container too?
  • b

    bright-gpu-74537

    06/12/2020, 8:55 AM
    possibly, yeah, i mean, you are removing all the children from the component
  • b

    bright-gpu-74537

    06/12/2020, 8:55 AM
    ah, no you arent
  • b

    bright-gpu-74537

    06/12/2020, 8:56 AM
    so i guess i would verify that the first child (index 0) is what you expect it to be, its possible that haxeui is adding a child at a specific index
  • c

    cool-psychiatrist-49311

    06/12/2020, 8:56 AM
    oh actually there are components:
    Copy code
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: h2d.Object
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: h2d.Interactive
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: haxe.ui.components.Label
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: haxe.ui.components.Button
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: haxe.ui.components.Label
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: haxe.ui.components.Button
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: h2d.Object
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: h2d.Graphics
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: h2d.Graphics
    ../haxeui-heaps/haxe/ui/backend/heaps/StyleHelper.hx:16: h2d.Graphics
  • b

    bright-gpu-74537

    06/12/2020, 8:57 AM
    oh yeah, interactive is a must too, other wise you dont get events
  • b

    bright-gpu-74537

    06/12/2020, 8:58 AM
    so i guess you need to always make sure the first child is the container
1...274275276...1687Latest