From 0d3dc299cd7fd315205635fb5702eedfb5195ac5 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 31 Oct 2021 23:18:57 +0100 Subject: [PATCH] Update raygui.h --- src/raygui.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index dfb7792..da231eb 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -2349,7 +2349,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode) { int glyphWidth = 0; if (glyphInfo.advanceX != 0) glyphWidth += glyphInfo.advanceX; - else glyphWidth += (atlasRec.width + glyphInfo.offsetX); + else glyphWidth += (int)(atlasRec.width + glyphInfo.offsetX); // Jump line if the end of the text box area has been reached if ((cursorPos.x + (glyphWidth*scaleFactor)) > (textAreaBounds.x + textAreaBounds.width)) @@ -2382,7 +2382,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode) int glyphWidth = 0; if (glyphInfo.advanceX != 0) glyphWidth += glyphInfo.advanceX; - else glyphWidth += (atlasRec.width + glyphInfo.offsetX); + else glyphWidth += (int)(atlasRec.width + glyphInfo.offsetX); cursorPos.x += (glyphWidth*scaleFactor + (float)GuiGetStyle(DEFAULT, TEXT_SPACING)); //if (i > lastSpacePos) lastSpaceWidth += (atlasRec.width + (float)GuiGetStyle(DEFAULT, TEXT_SPACING));