]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Special handling of the scrolling with mouse wheel isn't needed anymore in the screen...
authorterencehill <piuntn@gmail.com>
Fri, 31 Jul 2015 17:29:27 +0000 (19:29 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 31 Jul 2015 17:29:27 +0000 (19:29 +0200)
qcsrc/menu/xonotic/screenshotlist.qc

index 0b3d473e96933c550f25fc99c0eb0093e95c1b88..99780ed832c4c3970041c74eeb3ed6774165da2a 100644 (file)
@@ -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