From 901b509991e491b82da84fc877ea42774250d5b4 Mon Sep 17 00:00:00 2001 From: Rusty Striker Date: Thu, 6 Jul 2023 13:10:45 +0300 Subject: [PATCH] fix handle drawing to properly be a square now --- ui.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui.c b/ui.c index 8b39c04..ab49b82 100644 --- a/ui.c +++ b/ui.c @@ -72,11 +72,10 @@ void ui_slider_draw(ui_slider* s) { glVertex3f(pos.x, pos.y + ext.y, pos.z); // Draw slider button thing glColor3f(1.0, 1.0, 1.0); - glVertex3f(slider.x - ext.z, slider.y - ext.y, 0.0); - glVertex3f(slider.x + ext.z, slider.y - ext.y, 0.0); - glVertex3f(slider.x + ext.z, slider.y + ext.y, 0.0); - glVertex3f(slider.x - ext.z, slider.y + ext.y, 0.0); - + glVertex3f(slider.x - ext.z, slider.y - ext.z, 0.0); + glVertex3f(slider.x + ext.z, slider.y - ext.z, 0.0); + glVertex3f(slider.x + ext.z, slider.y + ext.z, 0.0); + glVertex3f(slider.x - ext.z, slider.y + ext.z, 0.0); glEnd(); }