comparison 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
comparison
equal deleted inserted replaced
117:b91f2dd6f84d 118:249881ceff7b
736 // Basic controls set 736 // Basic controls set
737 RAYGUIAPI int GuiLabel(Rectangle bounds, const char *text); // Label control 737 RAYGUIAPI int GuiLabel(Rectangle bounds, const char *text); // Label control
738 RAYGUIAPI int GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked 738 RAYGUIAPI int GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked
739 RAYGUIAPI int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, returns true when clicked 739 RAYGUIAPI int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, returns true when clicked
740 RAYGUIAPI int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control 740 RAYGUIAPI int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control
741 RAYGUIAPI void JUNE_DrawRectangleLinesNoBottom(Rectangle rect, float thickness, Color color);
742 RAYGUIAPI int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control 741 RAYGUIAPI int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control
743 RAYGUIAPI int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control 742 RAYGUIAPI int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control
744 RAYGUIAPI int GuiCheckBox(Rectangle bounds, const char *text, bool *checked); // Check Box control, returns true when active 743 RAYGUIAPI int GuiCheckBox(Rectangle bounds, const char *text, bool *checked); // Check Box control, returns true when active
745 RAYGUIAPI int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control 744 RAYGUIAPI int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control
746 745
767 RAYGUIAPI int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha); // Color Bar Alpha control 766 RAYGUIAPI int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha); // Color Bar Alpha control
768 RAYGUIAPI int GuiColorBarHue(Rectangle bounds, const char *text, float *value); // Color Bar Hue control 767 RAYGUIAPI int GuiColorBarHue(Rectangle bounds, const char *text, float *value); // Color Bar Hue control
769 RAYGUIAPI int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Picker control that avoids conversion to RGB on each call (multiple color controls) 768 RAYGUIAPI int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Picker control that avoids conversion to RGB on each call (multiple color controls)
770 RAYGUIAPI int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV() 769 RAYGUIAPI int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV()
771 //---------------------------------------------------------------------------------------------------------- 770 //----------------------------------------------------------------------------------------------------------
771
772
773 // ---- CUSTOM ---- //
774 RAYGUIAPI void JUNE_DrawRectangleLinesNoBottom(Rectangle rect, float thickness, Color color);
772 775
773 #if !defined(RAYGUI_NO_ICONS) 776 #if !defined(RAYGUI_NO_ICONS)
774 777
775 #if !defined(RAYGUI_CUSTOM_ICONS) 778 #if !defined(RAYGUI_CUSTOM_ICONS)
776 //---------------------------------------------------------------------------------- 779 //----------------------------------------------------------------------------------
2105 GetColor(GuiGetStyle(TOGGLE, ((*active)? BASE_COLOR_PRESSED : (BASE + state*3)))) 2108 GetColor(GuiGetStyle(TOGGLE, ((*active)? BASE_COLOR_PRESSED : (BASE + state*3))))
2106 ); 2109 );
2107 JUNE_DrawRectangleLinesNoBottom( 2110 JUNE_DrawRectangleLinesNoBottom(
2108 bounds, 2111 bounds,
2109 GuiGetStyle(TOGGLE, BORDER_WIDTH), 2112 GuiGetStyle(TOGGLE, BORDER_WIDTH),
2110 GetColor(GuiGetStyle(TOGGLE, BORDER_COLOR_PRESSED)) 2113 GetColor(GuiGetStyle(TOGGLE, ((*active)? BORDER_COLOR_PRESSED : (BORDER + state*3))))
2111 ); 2114 );
2112 } 2115 }
2113 else 2116 else
2114 { 2117 {
2115 GuiDrawRectangle( 2118 GuiDrawRectangle(
2121 } 2124 }
2122 GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), GetColor(GuiGetStyle(TOGGLE, ((*active)? TEXT_COLOR_PRESSED : (TEXT + state*3))))); 2125 GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), GetColor(GuiGetStyle(TOGGLE, ((*active)? TEXT_COLOR_PRESSED : (TEXT + state*3)))));
2123 } 2126 }
2124 else 2127 else
2125 { 2128 {
2126 GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, BORDER + state*3)), GetColor(GuiGetStyle(TOGGLE, BASE + state*3))); 2129 Rectangle tmp = bounds;
2130 tmp.height += GuiGetStyle(TOGGLE, BORDER_WIDTH);
2131 if (*active)
2132 {
2133 GuiDrawRectangle(
2134 tmp,
2135 0,
2136 GetColor(GuiGetStyle(TOGGLE, ((*active)? BORDER_COLOR_PRESSED : (BORDER + state*3)))),
2137 GetColor(GuiGetStyle(TOGGLE, ((*active)? BASE_COLOR_PRESSED : (BASE + state*3))))
2138 );
2139 JUNE_DrawRectangleLinesNoBottom(
2140 bounds,
2141 GuiGetStyle(TOGGLE, BORDER_WIDTH),
2142 GetColor(GuiGetStyle(TOGGLE, ((*active)? BORDER_COLOR_PRESSED : (BORDER + state*3))))
2143 );
2144 }
2145 else
2146 {
2147 GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, BORDER + state*3)), GetColor(GuiGetStyle(TOGGLE, BASE + state*3)));
2148 }
2127 GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), GetColor(GuiGetStyle(TOGGLE, TEXT + state*3))); 2149 GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), GetColor(GuiGetStyle(TOGGLE, TEXT + state*3)));
2128 } 2150 }
2129 2151
2130 if (state == STATE_FOCUSED) { 2152 if (state == STATE_FOCUSED) {
2131 GuiTooltip(bounds); 2153 GuiTooltip(bounds);