From 0d959b12c2e8729c5cbcb591c77623b9759036a7 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 31 Jul 2015 19:29:27 +0200 Subject: [PATCH] Special handling of the scrolling with mouse wheel isn't needed anymore in the screenshotlist --- qcsrc/menu/xonotic/screenshotlist.qc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qcsrc/menu/xonotic/screenshotlist.qc b/qcsrc/menu/xonotic/screenshotlist.qc index 0b3d473e9..99780ed83 100644 --- a/qcsrc/menu/xonotic/screenshotlist.qc +++ b/qcsrc/menu/xonotic/screenshotlist.qc @@ -155,9 +155,8 @@ void XonoticScreenshotList_setSelected(entity me, float i) SUPER(XonoticScreenshotList).setSelected(me, i); if (me.pressed && me.selectedItem != selectedItem_save) { - // while dragging the scrollbar (or an item) - // for a smooth mouse movement do not load immediately the new selected images - me.newScreenshotTime = time + 0.22; // dragging an item we need a delay > 0.2 (from listbox: me.dragScrollTimer = time + 0.2;) + // avoid immediate image loading on quick repeated selection changes + me.newScreenshotTime = time + 0.22; } else if (time > me.newScreenshotTime) { @@ -295,8 +294,6 @@ float XonoticScreenshotList_keyDown(entity me, float scan, float ascii, float sh me.startScreenshot(me); return 1; } - if(scan == K_MWHEELUP || scan == K_MWHEELDOWN) - me.newScreenshotTime = time + 0.2; return SUPER(XonoticScreenshotList).keyDown(me, scan, ascii, shift); } #endif -- 2.39.2