-
Notifications
You must be signed in to change notification settings - Fork 563
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
(HELP PLEASE!!! Also, potential bugfix supplied.) Getting some strange text clipping behavior when dragging windows around. #646
Comments
I need some help with this one if anyone can. I've been at this one for a few days now and I'm losing my mind. Video in first post demonstrating what's going on. |
I'm noticing the biggest culprits are buttons and sliders. If I just use labels, it's a tiny bit less prone to this problem. |
And upon even further inspection, it seems to be related more specifically to NK_TEXT_CENTERED. There seems to be some kind of bug with how it calculates the width of the element. Because if I use centered text with labels, it behaves exactly like buttons do. (Aka. Borked) |
If I comment out line 23660 in nuklear.h, in nk_widget_text. The line that reads: It seemingly fixes the bug. Consider giving this a look over. |
@StrikerMan780 I am having this exact issue in my project as well. But it doesn't happen in the allegro5 demo I tested, so that indicates to me that I am doing something wrong, but idk.. This exhibits the strange text clipping Screen.Recording.2024-11-09.at.04.10.41.movThis works as expected Screen.Recording.2024-11-09.at.04.11.38.mov |
I managed to fix this by correcting the No strange clipping anymore🎉 |
Still can't find a way to fix it on my end without altering that line in Nuklear. The values I return from my text width functions are correct, it's the width of the text in pixels. |
The text seems to randomly clip for whatever reason, when I drag the window around my screen. Not entirely sure why.
Most of the code is based on the demo.
Link to the video demonstrating the problem:
https://shadowmavericks.com/files/ShareX/tfury_2024-05-25_22-41-40.mp4
Alt:
https://github.com/Immediate-Mode-UI/Nuklear/assets/1618721/8099e1ff-450a-486f-9282-a82584c83bbd
My code thus far:
The text was updated successfully, but these errors were encountered: