From 3a50c1b711dc2d6aa5abf7dfaeaefb1ec1239605 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 27 Aug 2019 14:03:56 +0200 Subject: [PATCH] Formatting tweaks --- src/raygui.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index ef829eb..90ba951 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -811,8 +811,8 @@ RAYGUIDEF int GuiTextBoxGetCursor(void) { return guiTextBoxState.cursor; } // Set selection of active textbox RAYGUIDEF void GuiTextBoxSetSelection(int start, int length) { - if(start < 0) start = 0; - if(length < 0) length = 0; + if (start < 0) start = 0; + if (length < 0) length = 0; GuiTextBoxSetCursor(start + length); guiTextBoxState.select = start; } @@ -820,10 +820,8 @@ RAYGUIDEF void GuiTextBoxSetSelection(int start, int length) // Get selection of active textbox RAYGUIDEF Vector2 GuiTextBoxGetSelection(void) { - if(guiTextBoxState.select == -1 || guiTextBoxState.select == guiTextBoxState.cursor) - return RAYGUI_CLITERAL(Vector2){ 0 }; - else if(guiTextBoxState.cursor > guiTextBoxState.select) - return RAYGUI_CLITERAL(Vector2){ guiTextBoxState.select, guiTextBoxState.cursor - guiTextBoxState.select }; + if (guiTextBoxState.select == -1 || guiTextBoxState.select == guiTextBoxState.cursor) return RAYGUI_CLITERAL(Vector2){ 0 }; + 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 }; }