fix overlapping text in fs

fixes #13
This commit is contained in:
ITotalJustice
2024-12-17 16:21:14 +00:00
parent 98ad2f485b
commit 433c2e220c

View File

@@ -773,7 +773,8 @@ void Menu::Draw(NVGcontext* vg, Theme* theme) {
}
nvgSave(vg);
nvgScissor(vg, x + text_xoffset+65, y, w-(x+text_xoffset+65+50), h);
const auto txt_clip = std::min(GetY() + GetH(), y + h) - y;
nvgScissor(vg, x + text_xoffset+65, y, w-(x+text_xoffset+65+50), txt_clip);
gfx::drawText(vg, x + text_xoffset+65, y + (h / 2.f), 20.f, e.name, NULL, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE, theme->elements[text_id].colour);
nvgRestore(vg);