mirror of
https://github.com/raysan5/raygui.git
synced 2026-01-28 17:59:18 -05:00
REVIEWED: Cast values to improve Zig interconnection
This commit is contained in:
@ -4513,8 +4513,8 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue)
|
|||||||
{
|
{
|
||||||
if (CHECK_BOUNDS_ID(bounds, guiSliderActive))
|
if (CHECK_BOUNDS_ID(bounds, guiSliderActive))
|
||||||
{
|
{
|
||||||
if (isVertical) value += (GetMouseDelta().y/(scrollbar.height - slider.height)*valueRange);
|
if (isVertical) value += (int)(GetMouseDelta().y/(scrollbar.height - slider.height)*valueRange);
|
||||||
else value += (GetMouseDelta().x/(scrollbar.width - slider.width)*valueRange);
|
else value += (int)(GetMouseDelta().x/(scrollbar.width - slider.width)*valueRange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -4550,8 +4550,8 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue)
|
|||||||
}
|
}
|
||||||
else if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
|
else if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
|
||||||
{
|
{
|
||||||
if (isVertical) value += (GetMouseDelta().y/(scrollbar.height - slider.height)*valueRange);
|
if (isVertical) value += (int)(GetMouseDelta().y/(scrollbar.height - slider.height)*valueRange);
|
||||||
else value += (GetMouseDelta().x/(scrollbar.width - slider.width)*valueRange);
|
else value += (int)(GetMouseDelta().x/(scrollbar.width - slider.width)*valueRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keyboard control on mouse hover scrollbar
|
// Keyboard control on mouse hover scrollbar
|
||||||
|
|||||||
Reference in New Issue
Block a user