]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/demolist.c
Delete empty files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / demolist.c
index f04fde83d8b1f7fd415a3d7b709e930b0ebb956a..9f5909676298fc15dc2e08027bf374d1cbf3afb1 100644 (file)
@@ -8,7 +8,7 @@ CLASS(XonoticDemoList) EXTENDS(XonoticListBox)
        METHOD(XonoticDemoList, startDemo, void(entity))
        METHOD(XonoticDemoList, timeDemo, void(entity))
        METHOD(XonoticDemoList, demoName, string(entity, float))
-       METHOD(XonoticDemoList, clickListBoxItem, void(entity, float, vector))
+       METHOD(XonoticDemoList, doubleClickListBoxItem, void(entity, float, vector))
        METHOD(XonoticDemoList, keyDown, float(entity, float, float, float))
        METHOD(XonoticDemoList, destroy, void(entity))
        METHOD(XonoticDemoList, showNotify, void(entity))
@@ -21,8 +21,6 @@ CLASS(XonoticDemoList) EXTENDS(XonoticListBox)
        ATTRIB(XonoticDemoList, origin, vector, '0 0 0')
        ATTRIB(XonoticDemoList, itemAbsSize, vector, '0 0 0')
 
-       ATTRIB(XonoticDemoList, lastClickedDemo, float, -1)
-       ATTRIB(XonoticDemoList, lastClickedTime, float, 0)
        ATTRIB(XonoticDemoList, filterString, string, string_null)
 ENDCLASS(XonoticDemoList)
 
@@ -192,7 +190,7 @@ void XonoticDemoList_timeDemo(entity me)
 
 void DemoConfirm_ListClick_Check_Gamestatus(entity me)
 {
-       if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) // we're not in a match, lets watch the demo
+       if(!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) // we're not in a match, lets watch the demo
        {
                me.startDemo(me);
        }
@@ -207,17 +205,9 @@ void DemoConfirm_ListClick_Check_Gamestatus(entity me)
        }
 }
 
-void XonoticDemoList_clickListBoxItem(entity me, float i, vector where)
+void XonoticDemoList_doubleClickListBoxItem(entity me, float i, vector where)
 {
-       if(i == me.lastClickedDemo)
-               if(time < me.lastClickedTime + 0.3)
-               {
-                       // DOUBLE CLICK!
-                       me.setSelected(me, i);
-                       DemoConfirm_ListClick_Check_Gamestatus(me);
-               }
-       me.lastClickedDemo = i;
-       me.lastClickedTime = time;
+       DemoConfirm_ListClick_Check_Gamestatus(me);
 }
 
 float XonoticDemoList_keyDown(entity me, float scan, float ascii, float shift)