Jump to content

GUI - StackPanel with Width & auto-skip to new line.


Recommended Posts

Hi all,

i've started converting my HTML UI to Babylon GUI, 
and found myself in need of a horizontal stackpanel which has a defined width,
exceeding that width, a new line is started below.

It's still pretty rough and ugly, but basics are working :)

check lines 141 - 148 for quick access to different width's of the panel.
it hasn't been tested with different sized children.
overwrites panel.top as it offsets for height changes.
( Only works on 3.1 Alpha as that is the StackPanel._preMeasure used,
should however be fairly easy to copy&paste the changes into the stable version if one wishes to do so. )

Feel free to use, change, improve, etc etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...