From e3871c628b74dbe1cefe209d405eb9a815184094 Mon Sep 17 00:00:00 2001 From: Samual Date: Wed, 18 Jan 2012 11:06:41 -0500 Subject: [PATCH] quick updates for demolist (fixes demo playback when playing a demo with a space in its name) --- qcsrc/menu/xonotic/demolist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/menu/xonotic/demolist.c b/qcsrc/menu/xonotic/demolist.c index 290e8faea..2daed8bcb 100644 --- a/qcsrc/menu/xonotic/demolist.c +++ b/qcsrc/menu/xonotic/demolist.c @@ -11,6 +11,7 @@ CLASS(XonoticDemoList) EXTENDS(XonoticListBox) METHOD(XonoticDemoList, keyDown, float(entity, float, float, float)) METHOD(XonoticDemoList, destroy, void(entity)) METHOD(XonoticDemoList, showNotify, void(entity)) + ATTRIB(XonoticDemoList, listDemo, float, -1) ATTRIB(XonoticDemoList, realFontSize, vector, '0 0 0') ATTRIB(XonoticDemoList, columnNameOrigin, float, 0) @@ -18,6 +19,7 @@ CLASS(XonoticDemoList) EXTENDS(XonoticListBox) ATTRIB(XonoticDemoList, realUpperMargin, float, 0) 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) @@ -127,7 +129,7 @@ void XonoticDemoList_startDemo(entity me) { string s; s = me.demoName(me,me.selectedItem); - localcmd("playdemo demos/", s, ".dem\nwait\ntogglemenu\n"); + localcmd("playdemo \"demos/", s, ".dem\" \nwait \ntogglemenu\n"); } void StartDemo_Click(entity btn, entity me) @@ -139,7 +141,7 @@ void TimeDemo_Click(entity btn, entity me) { string s; s = me.demoName(me,me.selectedItem); - localcmd("timedemo demos/", s, ".dem\nwait\ntogglemenu\n"); + localcmd("timedemo \"demos/", s, ".dem\" \nwait \ntogglemenu\n"); } void XonoticDemoList_clickListBoxItem(entity me, float i, vector where) -- 2.39.2