mirror of
https://github.com/raysan5/raygui.git
synced 2026-02-01 03:39:18 -05:00
REVIEWED: GuiTabBar() detect middle button press over tab
This commit is contained in:
@ -1743,6 +1743,9 @@ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active)
|
|||||||
if (toggle) *active = i;
|
if (toggle) *active = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Close tab with middle mouse button pressed
|
||||||
|
if (CheckCollisionPointRec(GetMousePosition(), tabBounds) && IsMouseButtonPressed(MOUSE_MIDDLE_BUTTON)) result = i;
|
||||||
|
|
||||||
GuiSetStyle(TOGGLE, TEXT_PADDING, textPadding);
|
GuiSetStyle(TOGGLE, TEXT_PADDING, textPadding);
|
||||||
GuiSetStyle(TOGGLE, TEXT_ALIGNMENT, textAlignment);
|
GuiSetStyle(TOGGLE, TEXT_ALIGNMENT, textAlignment);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user