Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"FixWidthSizer" unwanted expansion #454

Open
dtturcotte opened this issue Jun 27, 2024 · 1 comment
Open

"FixWidthSizer" unwanted expansion #454

dtturcotte opened this issue Jun 27, 2024 · 1 comment
Labels

Comments

@dtturcotte
Copy link

dtturcotte commented Jun 27, 2024

Please see this forked code.

I've set the width: 100, but you'll notice extra long content forces the rexUIScrollablePanel to expand beyond its set width.

This is causing a lot of UI issues currently. How can I fix this and force the width I set?

Note: In this Fix-Width Sizer Documentation, it says that width, height : Minimum width, minimum height., meaning only the minimums are set. The same is true for Scroll-able Panel with Fix-Width Sizer. Any recommendations? Even if I set wordWrap, it still causes an issue.

Note, I am using both RexUIBBCodeText and Phaser.GameObjects.Text and it's causing the same issues.


I checked my scrollablePanel width and height after adding elements then layout() and the width seems to adjust itself. How can I prevent this?

@rexrainbow
Copy link
Owner

rexrainbow commented Jun 27, 2024

Minimum width, minimum height, is the minimum size of ui element, not the maximun size, therefore the actual size after layout might larger these minWidth, minHeight setting.

For that use case, might try sliderXY mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants