GUI stackpanel alignment


Setting alignment on stackpanel works differently on stable version than latest version (and differently than a version i downloaded 4 days ago).

Is it working correctly or…?

playing with .isVertical option changes behaviour.

Man i gotta say i’m having a rough time with GUI right now. First upgrade from some 3.3 preview version to “latest” caused a bunch of issues, i managed to fix them but now i grabbed a ~4 days fresher version and things have gone horribly wrong again :cry:

I’m afraid to start fixing things on my side again cos i don’t know if it’s bugs or what’s going on :confused:

Hi @lihis
They are doing a ton of updates to the GUI system so bugs are to be expected, i suggest using the stable version for now if you can.
However, i’m sure any reports with examples of these changes in behavior would be very welcome so they can either be dismissed as intentional changes or fixed as bugs :slight_smile:

There’s a playground where you can test / see the aligments and how it behaves. And then also compare stable and latest version of the playground.

I’m also having issues where disposing items doesn’t remove them from screen / advancedtexture, i have to manually remove them. But the playground didn’t seem to have this issue when i tried so i don’t know about that one.

I think’s there’s some other problem(s) as well but yeah let’s see about the aligment issue first.

Alignments work fine, i think what’s changed is how the stackPanel size is calculated,
In the 4.0 version, stackpanel is 1 (100%) in size by default, aka. largest possible size depending on parent.

So, if we add panel.width = 0.2; and change button from 0.2 to 1, alignments work again :slight_smile:

1 Like

As for isVertical, we need to change some values between the two modes, vertical uses height, while horizontal uses width of course.

Exactly…You are spot on :slight_smile: Thanks a lot @aWeirdo

@lihis: I get your disappointment but it was necessary changes as the stackpanel was wrong before. I promise that it should be more stable for now :slight_smile:

1 Like

@aWeirdo & @Deltakosh

Could you help with getting to work.

It should be a list (header, items, footer) of lists. It was working on older version and i can’t figure out how to make it work the way i want to anymore. :thinking:

Ok i was missing a return on subitem so with that fixed it’s almost working the way i would like to.

Just need the footer in right place now…

Edit: removing item from the sublist also seems to cause some strange duplication ?

It is a bug in the invalidation process. I’ll have it fixed for you in the next nightly

1 Like

All righty, cool :cold_face:

So when that is done, i guess this should be correct code, heights set properly and all:

List of lists with header and footer. Lot of rects and stacks panels :smile:

1 Like

Should be fine by end of day