Possible bug with TextBox in 7.1

Started by bacondude95, 16 November 2016, 04:51:13

bacondude95

When using a view other than the default with gui.setView(view); it seems that TextBox does not work properly. The text is not properly aligned with the box. I tested it with the default view and it worked as intended, but with custom view it does not.

Picture:

texus

I have been able to reproduce this, the problem seems to be with the way I calculate the clipping so it will likely affect some other widgets as well. But I haven't found the exact cause yet.
It does seem like the issue got fixed in 0.8-dev already when refactoring the clipping code, so if I can figure out what got changed then I can put the fix in 0.7 as well.

texus

I have found the issue but it will have to be fixed in all affected widgets individually.

I don't have time right now to fix all widgets but I have already fixed it in TextBox and several other widgets in a seperate branch: https://github.com/texus/TGUI/tree/WIP-clipping-fix
If you download and build that version than the problem you have with TextBox should be solved.

I'll make sure to have a fix for all widgets before I release 0.7.2 (which is planned to be released when SFML 2.5 is released), but it will likely be fixed much earlier (within the next week).

bacondude95

Alright, that works for me, thank you.