redstarcoder / draw2dui

draw2dui is a golang package for drawing user interfaces using draw2d and OpenGL.
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

Text viewport isn't always accurate #3

Open redstarcoder opened 7 years ago

redstarcoder commented 7 years ago

Sometimes the cursor's iOffset / iEdge are wrong, causing text to get cut off in certain situations (typically using big/small characters with a non-monospaced font).

redstarcoder commented 7 years ago

This might be able to be solved using FillWithin from redstarcoder/draw2dglkit and always drawing a text string bigger than the box, and setting the boundaries to the textbox boundaries. Then iOffset / iEdge would likely be measured in pixels instead of char count.