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

Request: Flag that makes the console window auto-resize to fit the contents (up to the specified height as a maximum) #113

Open
StrikerMan780 opened this issue Sep 20, 2024 · 3 comments

Comments

@StrikerMan780
Copy link
Contributor

StrikerMan780 commented Sep 20, 2024

I'm trying to make my menu window expand and contract to fit the size of the contents, but I'm having extreme difficulty calculating this correctly to prevent scrollbars from showing.

Video to demonstrate what I'm trying to do. It sorta works here, but it's buggy and inconsistent because it doesn't factor in the height of individual elements, padding, etc. The moment I change font, or use mixed sized elements, it falls apart:
https://shadowmavericks.com/files/ShareX/tfury_2024-09-20_16-25-29.mp4

Hell, even just a nk_console member that contains the bounds of the content (including anything that might be clipped by the window's border) would be useful here.

@RobLoach
Copy link
Owner

That'd be so awesome. Changing on height has always been annoying for me.

@StrikerMan780
Copy link
Contributor Author

Immediate-Mode-UI/Nuklear#694

Linking here to cross-reference, as this might require some changes on the Nuklear side of things.

@RobLoach
Copy link
Owner

Since we are getting the bounds of all widgets in their render functions, we might be able to get a sum in console_render(). Not sure that would consider padding and stuff though.

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

No branches or pull requests

2 participants