]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/item/listbox.qc
Merge branch 'master' into Mario/wepent_experimental
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / item / listbox.qc
index d9d63ab8c5abe2a6958b8c463fecdd985313ff4d..aa10c20b3b0f6d04bac8d5810e8b53b74bb799f2 100644 (file)
                oldshift = draw_shift;
                oldscale = draw_scale;
 
-               float y;
                i = me.getItemAtPos(me, me.scrollPos);
-               y = me.getItemStart(me, i) - me.scrollPos;
-               for ( ; i < me.nItems && y < 1; ++i)
+               float j = me.getItemStart(me, i) - me.scrollPos;
+               for ( ; i < me.nItems && j < 1; ++i)
                {
-                       draw_shift = boxToGlobal(eY * y, oldshift, oldscale);
+                       draw_shift = boxToGlobal(eY * j, oldshift, oldscale);
                        vector relSize = eX * (1 - me.controlWidth) + eY * me.getItemHeight(me, i);
                        absSize = boxToGlobalSize(relSize, me.size);
                        draw_scale = boxToGlobalSize(relSize, oldscale);
                        me.drawListBoxItem(me, i, absSize, (me.selectedItem == i), (me.focusedItem == i));
-                       y += relSize.y;
+                       j += relSize.y;
                }
                draw_ClearClip();