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

fix: 3d visualizer window is too big. #1969

Merged
merged 18 commits into from
Dec 15, 2024
Merged

Conversation

paxcut
Copy link
Contributor

@paxcut paxcut commented Nov 25, 2024

Problem description

Long error messages were forcing the width of the window to span the entire screen.

Implementation description

The fix was sending the long message to the log and outputting a short message to the 3d visualizer window.

paxcut and others added 2 commits November 25, 2024 05:31
Long error messages were forcing the width of the window to span the entire screen.
This was fixed by sending the long message to the log and outputting a short message to the 3d visualizer window.
@WerWolv
Copy link
Owner

WerWolv commented Nov 28, 2024

Thanks! Instead of shortening all the error messages though, would it make sense to maybe just wrap the error message so it doesn't overflow anymore using ImGui::TextWrapped? That way we can convey the full information on more complex errors while not making it look terrible

@paxcut
Copy link
Contributor Author

paxcut commented Nov 28, 2024

There are two kinds of error that the 3d visualizer may want to convey when the inputs are incorrect. One type is a short message describing what data is wrong, something like, bad indices and colors found. The other which can be potentially huge is a list of all the values that are wrong so that if there are only a few it may help the user find out whats wrong. If we truncate the message then it is not helpful.

@WerWolv
Copy link
Owner

WerWolv commented Nov 28, 2024

Where are we truncating them? If they get so big they go off-screen at the bottom we should make the error popup scrollable instead

@paxcut
Copy link
Contributor Author

paxcut commented Nov 28, 2024

Yes sorry, I misunderstood what you meant by wrapping. That is indeed a better solution which I'll look into implementing.

@paxcut
Copy link
Contributor Author

paxcut commented Dec 10, 2024

I added the requested code to display the messages with a scroll bar. Please review at your earliest convenience.

paxcut and others added 4 commits December 14, 2024 14:42
… be accepted by the pattern but produced errors messages during visualization for all other visualizers, so only tested on 3D visualizer.
@WerWolv WerWolv merged commit df5e01d into WerWolv:master Dec 15, 2024
15 checks passed
@WerWolv
Copy link
Owner

WerWolv commented Dec 15, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants