X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdemolist.c;h=9f5909676298fc15dc2e08027bf374d1cbf3afb1;hp=f04fde83d8b1f7fd415a3d7b709e930b0ebb956a;hb=121eb6e110924d6b9d95e1b353050d92c70bd0d6;hpb=5e3a7beca384caa6f3da36fe07b29aff942e7b3e diff --git a/qcsrc/menu/xonotic/demolist.c b/qcsrc/menu/xonotic/demolist.c index f04fde83d..9f5909676 100644 --- a/qcsrc/menu/xonotic/demolist.c +++ b/qcsrc/menu/xonotic/demolist.c @@ -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)