2023-07-19 15:09:41 +00:00
|
|
|
inline void UI_PushParent(ui_box * Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.ParentStackUsed + 1 < ArrayCount(UI->Stacks.ParentStack)); UI->Stacks.ParentStack[UI->Stacks.ParentStackUsed++] = Element; }
|
|
|
|
inline void UI_PushWidth(ui_size Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.WidthStackUsed + 1 < ArrayCount(UI->Stacks.WidthStack)); UI->Stacks.WidthStack[UI->Stacks.WidthStackUsed++] = Element; }
|
|
|
|
inline void UI_PushHeight(ui_size Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.HeightStackUsed + 1 < ArrayCount(UI->Stacks.HeightStack)); UI->Stacks.HeightStack[UI->Stacks.HeightStackUsed++] = Element; }
|
|
|
|
inline void UI_PushFixedX(r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.FixedXStackUsed + 1 < ArrayCount(UI->Stacks.FixedXStack)); UI->Stacks.FixedXStack[UI->Stacks.FixedXStackUsed++] = Element; }
|
|
|
|
inline void UI_PushFixedY(r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.FixedYStackUsed + 1 < ArrayCount(UI->Stacks.FixedYStack)); UI->Stacks.FixedYStack[UI->Stacks.FixedYStackUsed++] = Element; }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline void UI_PushTextColor(v4_r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.TextColorStackUsed + 1 < ArrayCount(UI->Stacks.TextColorStack)); UI->Stacks.TextColorStack[UI->Stacks.TextColorStackUsed++] = Element; }
|
|
|
|
inline void UI_PushBackgroundColor(v4_r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.BackgroundColorStackUsed + 1 < ArrayCount(UI->Stacks.BackgroundColorStack)); UI->Stacks.BackgroundColorStack[UI->Stacks.BackgroundColorStackUsed++] = Element; }
|
|
|
|
inline void UI_PushBorderColor(v4_r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.BorderColorStackUsed + 1 < ArrayCount(UI->Stacks.BorderColorStack)); UI->Stacks.BorderColorStack[UI->Stacks.BorderColorStackUsed++] = Element; }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline void UI_PushBorderThickness(r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.BorderThicknessStackUsed + 1 < ArrayCount(UI->Stacks.BorderThicknessStack)); UI->Stacks.BorderThicknessStack[UI->Stacks.BorderThicknessStackUsed++] = Element; }
|
|
|
|
inline void UI_PushLayoutAxis(axis2 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.LayoutAxisStackUsed + 1 < ArrayCount(UI->Stacks.LayoutAxisStack)); UI->Stacks.LayoutAxisStack[UI->Stacks.LayoutAxisStackUsed++] = Element; }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline void UI_PushCornerRadii(v4_r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.CornerRadiiStackUsed + 1 < ArrayCount(UI->Stacks.CornerRadiiStack)); UI->Stacks.CornerRadiiStack[UI->Stacks.CornerRadiiStackUsed++] = Element; }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline void UI_PushFont(font_id Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.FontStackUsed + 1 < ArrayCount(UI->Stacks.FontStack)); UI->Stacks.FontStack[UI->Stacks.FontStackUsed++] = Element; }
|
|
|
|
inline void UI_PushFontSize(r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.FontSizeStackUsed + 1 < ArrayCount(UI->Stacks.FontSizeStack)); UI->Stacks.FontSizeStack[UI->Stacks.FontSizeStackUsed++] = Element; }
|
|
|
|
inline void UI_PushOffsetX(r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.OffsetXStackUsed + 1 < ArrayCount(UI->Stacks.OffsetXStack)); UI->Stacks.OffsetXStack[UI->Stacks.OffsetXStackUsed++] = Element; }
|
|
|
|
inline void UI_PushOffsetY(r32 Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.OffsetYStackUsed + 1 < ArrayCount(UI->Stacks.OffsetYStack)); UI->Stacks.OffsetYStack[UI->Stacks.OffsetYStackUsed++] = Element; }
|
2023-08-22 03:19:51 +00:00
|
|
|
inline void UI_PushHoverCursor(platform_cursor Element) { ui *UI = UI_GetState(); Assert(UI->Stacks.HoverCursorStackUsed + 1 < ArrayCount(UI->Stacks.HoverCursorStack)); UI->Stacks.HoverCursorStack[UI->Stacks.HoverCursorStackUsed++] = Element; }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline void UI_PopParent(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.ParentStackUsed > 0); --UI->Stacks.ParentStackUsed; }
|
|
|
|
inline void UI_PopWidth(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.WidthStackUsed > 0); --UI->Stacks.WidthStackUsed; }
|
|
|
|
inline void UI_PopHeight(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.HeightStackUsed > 0); --UI->Stacks.HeightStackUsed; }
|
|
|
|
inline void UI_PopFixedX(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.FixedXStackUsed > 0); --UI->Stacks.FixedXStackUsed; }
|
|
|
|
inline void UI_PopFixedY(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.FixedYStackUsed > 0); --UI->Stacks.FixedYStackUsed; }
|
|
|
|
inline void UI_PopTextColor(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.TextColorStackUsed > 0); --UI->Stacks.TextColorStackUsed; }
|
|
|
|
inline void UI_PopBackgroundColor(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.BackgroundColorStackUsed > 0); --UI->Stacks.BackgroundColorStackUsed; }
|
|
|
|
inline void UI_PopBorderColor(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.BorderColorStackUsed > 0); --UI->Stacks.BorderColorStackUsed; }
|
|
|
|
inline void UI_PopBorderThickness(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.BorderThicknessStackUsed > 0); --UI->Stacks.BorderThicknessStackUsed; }
|
|
|
|
inline void UI_PopLayoutAxis(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.LayoutAxisStackUsed > 0); --UI->Stacks.LayoutAxisStackUsed; }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline void UI_PopCornerRadii(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.CornerRadiiStackUsed > 0); --UI->Stacks.CornerRadiiStackUsed; }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline void UI_PopFont(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.FontStackUsed > 0); --UI->Stacks.FontStackUsed; }
|
|
|
|
inline void UI_PopFontSize(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.FontSizeStackUsed > 0); --UI->Stacks.FontSizeStackUsed; }
|
|
|
|
inline void UI_PopOffsetX(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.OffsetXStackUsed > 0); --UI->Stacks.OffsetXStackUsed; }
|
|
|
|
inline void UI_PopOffsetY(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.OffsetYStackUsed > 0); --UI->Stacks.OffsetYStackUsed; }
|
2023-08-22 03:19:51 +00:00
|
|
|
inline void UI_PopHoverCursor(void) { ui *UI = UI_GetState(); Assert(UI->Stacks.HoverCursorStackUsed > 0); --UI->Stacks.HoverCursorStackUsed; }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline void UI_SetNextParent(ui_box * Element) { ui *UI = UI_GetState(); UI_PushParent(Element); UI->Stacks.AutoPopParent = true; }
|
|
|
|
inline void UI_SetNextWidth(ui_size Element) { ui *UI = UI_GetState(); UI_PushWidth(Element); UI->Stacks.AutoPopWidth = true; }
|
|
|
|
inline void UI_SetNextHeight(ui_size Element) { ui *UI = UI_GetState(); UI_PushHeight(Element); UI->Stacks.AutoPopHeight = true; }
|
|
|
|
inline void UI_SetNextFixedX(r32 Element) { ui *UI = UI_GetState(); UI_PushFixedX(Element); UI->Stacks.AutoPopFixedX = true; }
|
|
|
|
inline void UI_SetNextFixedY(r32 Element) { ui *UI = UI_GetState(); UI_PushFixedY(Element); UI->Stacks.AutoPopFixedY = true; }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline void UI_SetNextTextColor(v4_r32 Element) { ui *UI = UI_GetState(); UI_PushTextColor(Element); UI->Stacks.AutoPopTextColor = true; }
|
|
|
|
inline void UI_SetNextBackgroundColor(v4_r32 Element) { ui *UI = UI_GetState(); UI_PushBackgroundColor(Element); UI->Stacks.AutoPopBackgroundColor = true; }
|
|
|
|
inline void UI_SetNextBorderColor(v4_r32 Element) { ui *UI = UI_GetState(); UI_PushBorderColor(Element); UI->Stacks.AutoPopBorderColor = true; }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline void UI_SetNextBorderThickness(r32 Element) { ui *UI = UI_GetState(); UI_PushBorderThickness(Element); UI->Stacks.AutoPopBorderThickness = true; }
|
|
|
|
inline void UI_SetNextLayoutAxis(axis2 Element) { ui *UI = UI_GetState(); UI_PushLayoutAxis(Element); UI->Stacks.AutoPopLayoutAxis = true; }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline void UI_SetNextCornerRadii(v4_r32 Element) { ui *UI = UI_GetState(); UI_PushCornerRadii(Element); UI->Stacks.AutoPopCornerRadii = true; }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline void UI_SetNextFont(font_id Element) { ui *UI = UI_GetState(); UI_PushFont(Element); UI->Stacks.AutoPopFont = true; }
|
|
|
|
inline void UI_SetNextFontSize(r32 Element) { ui *UI = UI_GetState(); UI_PushFontSize(Element); UI->Stacks.AutoPopFontSize = true; }
|
|
|
|
inline void UI_SetNextOffsetX(r32 Element) { ui *UI = UI_GetState(); UI_PushOffsetX(Element); UI->Stacks.AutoPopOffsetX = true; }
|
|
|
|
inline void UI_SetNextOffsetY(r32 Element) { ui *UI = UI_GetState(); UI_PushOffsetY(Element); UI->Stacks.AutoPopOffsetY = true; }
|
2023-08-22 03:19:51 +00:00
|
|
|
inline void UI_SetNextHoverCursor(platform_cursor Element) { ui *UI = UI_GetState(); UI_PushHoverCursor(Element); UI->Stacks.AutoPopHoverCursor = true; }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline ui_box * UI_FirstParent(void) { ui *UI = UI_GetState(); return(UI->Stacks.ParentStack[0]); }
|
|
|
|
inline ui_size UI_FirstWidth(void) { ui *UI = UI_GetState(); return(UI->Stacks.WidthStack[0]); }
|
|
|
|
inline ui_size UI_FirstHeight(void) { ui *UI = UI_GetState(); return(UI->Stacks.HeightStack[0]); }
|
|
|
|
inline r32 UI_FirstFixedX(void) { ui *UI = UI_GetState(); return(UI->Stacks.FixedXStack[0]); }
|
|
|
|
inline r32 UI_FirstFixedY(void) { ui *UI = UI_GetState(); return(UI->Stacks.FixedYStack[0]); }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline v4_r32 UI_FirstTextColor(void) { ui *UI = UI_GetState(); return(UI->Stacks.TextColorStack[0]); }
|
|
|
|
inline v4_r32 UI_FirstBackgroundColor(void) { ui *UI = UI_GetState(); return(UI->Stacks.BackgroundColorStack[0]); }
|
|
|
|
inline v4_r32 UI_FirstBorderColor(void) { ui *UI = UI_GetState(); return(UI->Stacks.BorderColorStack[0]); }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline r32 UI_FirstBorderThickness(void) { ui *UI = UI_GetState(); return(UI->Stacks.BorderThicknessStack[0]); }
|
|
|
|
inline axis2 UI_FirstLayoutAxis(void) { ui *UI = UI_GetState(); return(UI->Stacks.LayoutAxisStack[0]); }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline v4_r32 UI_FirstCornerRadii(void) { ui *UI = UI_GetState(); return(UI->Stacks.CornerRadiiStack[0]); }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline font_id UI_FirstFont(void) { ui *UI = UI_GetState(); return(UI->Stacks.FontStack[0]); }
|
|
|
|
inline r32 UI_FirstFontSize(void) { ui *UI = UI_GetState(); return(UI->Stacks.FontSizeStack[0]); }
|
|
|
|
inline r32 UI_FirstOffsetX(void) { ui *UI = UI_GetState(); return(UI->Stacks.OffsetXStack[0]); }
|
|
|
|
inline r32 UI_FirstOffsetY(void) { ui *UI = UI_GetState(); return(UI->Stacks.OffsetYStack[0]); }
|
2023-08-22 03:19:51 +00:00
|
|
|
inline platform_cursor UI_FirstHoverCursor(void) { ui *UI = UI_GetState(); return(UI->Stacks.HoverCursorStack[0]); }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline ui_box * UI_TopParent(void) { ui *UI = UI_GetState(); return(UI->Stacks.ParentStack[UI->Stacks.ParentStackUsed - 1]); }
|
|
|
|
inline ui_size UI_TopWidth(void) { ui *UI = UI_GetState(); return(UI->Stacks.WidthStack[UI->Stacks.WidthStackUsed - 1]); }
|
|
|
|
inline ui_size UI_TopHeight(void) { ui *UI = UI_GetState(); return(UI->Stacks.HeightStack[UI->Stacks.HeightStackUsed - 1]); }
|
|
|
|
inline r32 UI_TopFixedX(void) { ui *UI = UI_GetState(); return(UI->Stacks.FixedXStack[UI->Stacks.FixedXStackUsed - 1]); }
|
|
|
|
inline r32 UI_TopFixedY(void) { ui *UI = UI_GetState(); return(UI->Stacks.FixedYStack[UI->Stacks.FixedYStackUsed - 1]); }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline v4_r32 UI_TopTextColor(void) { ui *UI = UI_GetState(); return(UI->Stacks.TextColorStack[UI->Stacks.TextColorStackUsed - 1]); }
|
|
|
|
inline v4_r32 UI_TopBackgroundColor(void) { ui *UI = UI_GetState(); return(UI->Stacks.BackgroundColorStack[UI->Stacks.BackgroundColorStackUsed - 1]); }
|
|
|
|
inline v4_r32 UI_TopBorderColor(void) { ui *UI = UI_GetState(); return(UI->Stacks.BorderColorStack[UI->Stacks.BorderColorStackUsed - 1]); }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline r32 UI_TopBorderThickness(void) { ui *UI = UI_GetState(); return(UI->Stacks.BorderThicknessStack[UI->Stacks.BorderThicknessStackUsed - 1]); }
|
|
|
|
inline axis2 UI_TopLayoutAxis(void) { ui *UI = UI_GetState(); return(UI->Stacks.LayoutAxisStack[UI->Stacks.LayoutAxisStackUsed - 1]); }
|
2024-01-20 11:18:57 +00:00
|
|
|
inline v4_r32 UI_TopCornerRadii(void) { ui *UI = UI_GetState(); return(UI->Stacks.CornerRadiiStack[UI->Stacks.CornerRadiiStackUsed - 1]); }
|
2023-07-19 15:09:41 +00:00
|
|
|
inline font_id UI_TopFont(void) { ui *UI = UI_GetState(); return(UI->Stacks.FontStack[UI->Stacks.FontStackUsed - 1]); }
|
|
|
|
inline r32 UI_TopFontSize(void) { ui *UI = UI_GetState(); return(UI->Stacks.FontSizeStack[UI->Stacks.FontSizeStackUsed - 1]); }
|
|
|
|
inline r32 UI_TopOffsetX(void) { ui *UI = UI_GetState(); return(UI->Stacks.OffsetXStack[UI->Stacks.OffsetXStackUsed - 1]); }
|
|
|
|
inline r32 UI_TopOffsetY(void) { ui *UI = UI_GetState(); return(UI->Stacks.OffsetYStack[UI->Stacks.OffsetYStackUsed - 1]); }
|
2023-08-22 03:19:51 +00:00
|
|
|
inline platform_cursor UI_TopHoverCursor(void) { ui *UI = UI_GetState(); return(UI->Stacks.HoverCursorStack[UI->Stacks.HoverCursorStackUsed - 1]); }
|
2023-07-19 15:09:41 +00:00
|
|
|
#define UI_Parent(Element) DeferLoop(UI_PushParent(Element), UI_PopParent())
|
|
|
|
#define UI_Width(Element) DeferLoop(UI_PushWidth(Element), UI_PopWidth())
|
|
|
|
#define UI_Height(Element) DeferLoop(UI_PushHeight(Element), UI_PopHeight())
|
|
|
|
#define UI_FixedX(Element) DeferLoop(UI_PushFixedX(Element), UI_PopFixedX())
|
|
|
|
#define UI_FixedY(Element) DeferLoop(UI_PushFixedY(Element), UI_PopFixedY())
|
|
|
|
#define UI_TextColor(Element) DeferLoop(UI_PushTextColor(Element), UI_PopTextColor())
|
|
|
|
#define UI_BackgroundColor(Element) DeferLoop(UI_PushBackgroundColor(Element), UI_PopBackgroundColor())
|
|
|
|
#define UI_BorderColor(Element) DeferLoop(UI_PushBorderColor(Element), UI_PopBorderColor())
|
|
|
|
#define UI_BorderThickness(Element) DeferLoop(UI_PushBorderThickness(Element), UI_PopBorderThickness())
|
|
|
|
#define UI_LayoutAxis(Element) DeferLoop(UI_PushLayoutAxis(Element), UI_PopLayoutAxis())
|
2024-01-20 11:18:57 +00:00
|
|
|
#define UI_CornerRadii(Element) DeferLoop(UI_PushCornerRadii(Element), UI_PopCornerRadii())
|
2023-07-19 15:09:41 +00:00
|
|
|
#define UI_Font(Element) DeferLoop(UI_PushFont(Element), UI_PopFont())
|
|
|
|
#define UI_FontSize(Element) DeferLoop(UI_PushFontSize(Element), UI_PopFontSize())
|
|
|
|
#define UI_OffsetX(Element) DeferLoop(UI_PushOffsetX(Element), UI_PopOffsetX())
|
|
|
|
#define UI_OffsetY(Element) DeferLoop(UI_PushOffsetY(Element), UI_PopOffsetY())
|
2023-08-22 03:19:51 +00:00
|
|
|
#define UI_HoverCursor(Element) DeferLoop(UI_PushHoverCursor(Element), UI_PopHoverCursor())
|
2023-07-19 15:09:41 +00:00
|
|
|
|
|
|
|
static void UI_ApplyStyles(ui_box *Box)
|
|
|
|
{
|
|
|
|
ui *UI = UI_GetState();
|
|
|
|
Assert(UI->Stacks.ParentStackUsed > 0); Box->Parent = UI->Stacks.ParentStack[UI->Stacks.ParentStackUsed - 1]; if(UI->Stacks.AutoPopParent) { UI_PopParent(); UI->Stacks.AutoPopParent = false; }
|
|
|
|
Assert(UI->Stacks.WidthStackUsed > 0); Box->SemanticSize[Axis2_X] = UI->Stacks.WidthStack[UI->Stacks.WidthStackUsed - 1]; if(UI->Stacks.AutoPopWidth) { UI_PopWidth(); UI->Stacks.AutoPopWidth = false; }
|
|
|
|
Assert(UI->Stacks.HeightStackUsed > 0); Box->SemanticSize[Axis2_Y] = UI->Stacks.HeightStack[UI->Stacks.HeightStackUsed - 1]; if(UI->Stacks.AutoPopHeight) { UI_PopHeight(); UI->Stacks.AutoPopHeight = false; }
|
|
|
|
Assert(UI->Stacks.FixedXStackUsed > 0); Box->FixedP.E[Axis2_X] = UI->Stacks.FixedXStack[UI->Stacks.FixedXStackUsed - 1]; if(UI->Stacks.AutoPopFixedX) { UI_PopFixedX(); UI->Stacks.AutoPopFixedX = false; }
|
|
|
|
Assert(UI->Stacks.FixedYStackUsed > 0); Box->FixedP.E[Axis2_Y] = UI->Stacks.FixedYStack[UI->Stacks.FixedYStackUsed - 1]; if(UI->Stacks.AutoPopFixedY) { UI_PopFixedY(); UI->Stacks.AutoPopFixedY = false; }
|
|
|
|
Assert(UI->Stacks.TextColorStackUsed > 0); Box->TextColor = UI->Stacks.TextColorStack[UI->Stacks.TextColorStackUsed - 1]; if(UI->Stacks.AutoPopTextColor) { UI_PopTextColor(); UI->Stacks.AutoPopTextColor = false; }
|
|
|
|
Assert(UI->Stacks.BackgroundColorStackUsed > 0); Box->BackgroundColor = UI->Stacks.BackgroundColorStack[UI->Stacks.BackgroundColorStackUsed - 1]; if(UI->Stacks.AutoPopBackgroundColor) { UI_PopBackgroundColor(); UI->Stacks.AutoPopBackgroundColor = false; }
|
|
|
|
Assert(UI->Stacks.BorderColorStackUsed > 0); Box->BorderColor = UI->Stacks.BorderColorStack[UI->Stacks.BorderColorStackUsed - 1]; if(UI->Stacks.AutoPopBorderColor) { UI_PopBorderColor(); UI->Stacks.AutoPopBorderColor = false; }
|
|
|
|
Assert(UI->Stacks.BorderThicknessStackUsed > 0); Box->BorderThickness = UI->Stacks.BorderThicknessStack[UI->Stacks.BorderThicknessStackUsed - 1]; if(UI->Stacks.AutoPopBorderThickness) { UI_PopBorderThickness(); UI->Stacks.AutoPopBorderThickness = false; }
|
|
|
|
Assert(UI->Stacks.LayoutAxisStackUsed > 0); Box->LayoutAxis = UI->Stacks.LayoutAxisStack[UI->Stacks.LayoutAxisStackUsed - 1]; if(UI->Stacks.AutoPopLayoutAxis) { UI_PopLayoutAxis(); UI->Stacks.AutoPopLayoutAxis = false; }
|
2024-01-20 11:18:57 +00:00
|
|
|
Assert(UI->Stacks.CornerRadiiStackUsed > 0); Box->CornerRadii = UI->Stacks.CornerRadiiStack[UI->Stacks.CornerRadiiStackUsed - 1]; if(UI->Stacks.AutoPopCornerRadii) { UI_PopCornerRadii(); UI->Stacks.AutoPopCornerRadii = false; }
|
2023-07-19 15:09:41 +00:00
|
|
|
Assert(UI->Stacks.FontStackUsed > 0); Box->Font = UI->Stacks.FontStack[UI->Stacks.FontStackUsed - 1]; if(UI->Stacks.AutoPopFont) { UI_PopFont(); UI->Stacks.AutoPopFont = false; }
|
|
|
|
Assert(UI->Stacks.FontSizeStackUsed > 0); Box->FontSize = UI->Stacks.FontSizeStack[UI->Stacks.FontSizeStackUsed - 1]; if(UI->Stacks.AutoPopFontSize) { UI_PopFontSize(); UI->Stacks.AutoPopFontSize = false; }
|
|
|
|
Assert(UI->Stacks.OffsetXStackUsed > 0); Box->Offset.x = UI->Stacks.OffsetXStack[UI->Stacks.OffsetXStackUsed - 1]; if(UI->Stacks.AutoPopOffsetX) { UI_PopOffsetX(); UI->Stacks.AutoPopOffsetX = false; }
|
|
|
|
Assert(UI->Stacks.OffsetYStackUsed > 0); Box->Offset.y = UI->Stacks.OffsetYStack[UI->Stacks.OffsetYStackUsed - 1]; if(UI->Stacks.AutoPopOffsetY) { UI_PopOffsetY(); UI->Stacks.AutoPopOffsetY = false; }
|
2023-08-22 03:19:51 +00:00
|
|
|
Assert(UI->Stacks.HoverCursorStackUsed > 0); Box->HoverCursor = UI->Stacks.HoverCursorStack[UI->Stacks.HoverCursorStackUsed - 1]; if(UI->Stacks.AutoPopHoverCursor) { UI_PopHoverCursor(); UI->Stacks.AutoPopHoverCursor = false; }
|
2023-07-19 15:09:41 +00:00
|
|
|
}
|
|
|
|
|