Jump to content

GUI panel positions problem


TomaszFurca
 Share

Recommended Posts

Hi, I working on GUI in game and i have problem with many panels. What i want to do?

1. set panelItems container in main panel named in my PG as container. Now i must add it on guiTexture to correct display.
2. set iconsImages in my panelItems with wrapping images in panel, now items increase height of panelItems.
3. Is it possible to correct resize panel items to imageContainer (when first point has been resolved). At this moment, when i resize window i lost correct position and size of panelItems, because image in imageContainer is stretched.
4. Should I make fixed resolution in my game, and then for every available resolution set correct values of position?

https://www.babylonjs-playground.com/#59N785#1

Thanks for help 

Tomasz Furca

Link to comment
Share on other sites

Okey :).

First point line 63 has been changed, because i want manage all childrens of main container calling for example texture.removeFromControl(cotainer). https://www.babylonjs-playground.com/#59N785#2

Second point, panelItems (stackPanel) have width 0.33 on fullscreen texture with non vertical positions. I added three images with 0.2 width to this panel. Then this panel has been expanded, but i want keep width of panel and add image wrapping to panelItems. https://www.babylonjs-playground.com/#59N785#1. Remove one item from panel and check what happen: https://www.babylonjs-playground.com/#59N785#3.

Third point maybe resolved when we fix realize first.

Fourth point is theory question :).

 

Link to comment
Share on other sites

Rectangle is not expanded so ok - https://www.babylonjs-playground.com/#59N785#4.

Is possible to auto set positions of childrens of rectangle panel (for example set x% from left and x% from top)? 
I can set it mannualy, but after resize windows always i must change position values (left, top).

How about set correct position of rectangle panel on inventory background? Do you have any tip, how do that correct?

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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