diff third_party/raylib/include/raygui.h @ 118:249881ceff7b

[PostDog] Updated some core logic. Will create a bookmark for postdog until the launch as this is annoying to deal with.
author June Park <parkjune1995@gmail.com>
date Wed, 07 Jan 2026 13:24:38 -0800
parents 7bd795bac997
children 2db6253f355d
line wrap: on
line diff
--- a/third_party/raylib/include/raygui.h	Wed Jan 07 05:02:45 2026 -0800
+++ b/third_party/raylib/include/raygui.h	Wed Jan 07 13:24:38 2026 -0800
@@ -738,7 +738,6 @@
 RAYGUIAPI int GuiButton(Rectangle bounds, const char *text);                                           // Button control, returns true when clicked
 RAYGUIAPI int GuiLabelButton(Rectangle bounds, const char *text);                                      // Label button control, returns true when clicked
 RAYGUIAPI int GuiToggle(Rectangle bounds, const char *text, bool *active);                             // Toggle Button control
-RAYGUIAPI void JUNE_DrawRectangleLinesNoBottom(Rectangle rect, float thickness, Color color);
 RAYGUIAPI int GuiToggleGroup(Rectangle bounds, const char *text, int *active);                         // Toggle Group control
 RAYGUIAPI int GuiToggleSlider(Rectangle bounds, const char *text, int *active);                        // Toggle Slider control
 RAYGUIAPI int GuiCheckBox(Rectangle bounds, const char *text, bool *checked);                          // Check Box control, returns true when active
@@ -770,6 +769,10 @@
 RAYGUIAPI int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv);                 // Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV()
 //----------------------------------------------------------------------------------------------------------
 
+
+// ---- CUSTOM ---- //
+RAYGUIAPI void JUNE_DrawRectangleLinesNoBottom(Rectangle rect, float thickness, Color color);
+
 #if !defined(RAYGUI_NO_ICONS)
 
 #if !defined(RAYGUI_CUSTOM_ICONS)
@@ -2107,7 +2110,7 @@
           JUNE_DrawRectangleLinesNoBottom(
               bounds, 
               GuiGetStyle(TOGGLE, BORDER_WIDTH),
-              GetColor(GuiGetStyle(TOGGLE, BORDER_COLOR_PRESSED))
+              GetColor(GuiGetStyle(TOGGLE, ((*active)? BORDER_COLOR_PRESSED : (BORDER + state*3))))
           );
         }
         else
@@ -2123,7 +2126,26 @@
     }
     else
     {
-        GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, BORDER + state*3)), GetColor(GuiGetStyle(TOGGLE, BASE + state*3)));
+        Rectangle tmp = bounds;
+        tmp.height += GuiGetStyle(TOGGLE, BORDER_WIDTH); 
+        if (*active)
+        {
+          GuiDrawRectangle(
+              tmp, 
+              0, 
+              GetColor(GuiGetStyle(TOGGLE, ((*active)? BORDER_COLOR_PRESSED : (BORDER + state*3)))), 
+              GetColor(GuiGetStyle(TOGGLE, ((*active)? BASE_COLOR_PRESSED : (BASE + state*3))))
+          );
+          JUNE_DrawRectangleLinesNoBottom(
+              bounds, 
+              GuiGetStyle(TOGGLE, BORDER_WIDTH),
+              GetColor(GuiGetStyle(TOGGLE, ((*active)? BORDER_COLOR_PRESSED : (BORDER + state*3))))
+          );
+        }
+        else
+        {
+          GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, BORDER + state*3)), GetColor(GuiGetStyle(TOGGLE, BASE + state*3)));
+        }
         GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), GetColor(GuiGetStyle(TOGGLE, TEXT + state*3)));
     }