Formatting tweaks

This commit is contained in:
raysan5 2019-08-27 14:03:56 +02:00
parent 5b2cef84a1
commit 3a50c1b711

View File

@ -820,10 +820,8 @@ RAYGUIDEF void GuiTextBoxSetSelection(int start, int length)
// Get selection of active textbox // Get selection of active textbox
RAYGUIDEF Vector2 GuiTextBoxGetSelection(void) RAYGUIDEF Vector2 GuiTextBoxGetSelection(void)
{ {
if(guiTextBoxState.select == -1 || guiTextBoxState.select == guiTextBoxState.cursor) if (guiTextBoxState.select == -1 || guiTextBoxState.select == guiTextBoxState.cursor) return RAYGUI_CLITERAL(Vector2){ 0 };
return RAYGUI_CLITERAL(Vector2){ 0 }; else if (guiTextBoxState.cursor > guiTextBoxState.select) return RAYGUI_CLITERAL(Vector2){ guiTextBoxState.select, guiTextBoxState.cursor - guiTextBoxState.select };
else if(guiTextBoxState.cursor > guiTextBoxState.select)
return RAYGUI_CLITERAL(Vector2){ guiTextBoxState.select, guiTextBoxState.cursor - guiTextBoxState.select };
return RAYGUI_CLITERAL(Vector2){ guiTextBoxState.cursor, guiTextBoxState.select - guiTextBoxState.cursor }; return RAYGUI_CLITERAL(Vector2){ guiTextBoxState.cursor, guiTextBoxState.select - guiTextBoxState.cursor };
} }