AllenDang / cimgui-go

Auto generated Go wrapper for Dear ImGui via cimgui
MIT License
298 stars 43 forks source link

CalcTextSizeV skips last character #257

Closed Wieku closed 4 months ago

Wieku commented 4 months ago

I have some layout calculations done based on text size. I've noticed that all calculations are somewhat wrong. It seems like it skips the last character.

It seems like the issue is located here:

https://github.com/AllenDang/cimgui-go/blob/e7421faa8e45ef9dcb5fa9b20e1f82b653fd30c8/cimgui_wrapper.cpp#L27

I don't think it should subtract 1 from length