9 me.configureXonoticDemoList(me);
15 me.configureXonoticListBox(me);
22 s = bufstr_get(me.listDemo, i);
39 s=
strcat(s, me.filterString, ext);
48 for(i = 0; i < n; ++i)
55 s = strreplace(
"/",
"^7/", s);
57 bufstr_add(me.listDemo, s,
true);
59 else { bufstr_add(me.listDemo, s,
true); }
79 me.nItems = buf_getsize(me.listDemo);
81 buf_sort(me.listDemo, 128,
false);
92 me.itemAbsSize =
'0 0 0';
95 me.itemAbsSize.y = absSize.y * me.itemHeight;
96 me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
97 me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
98 me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
99 me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
101 me.columnNameOrigin = me.realFontSize.x;
102 me.columnNameSize = 1 - 2 * me.realFontSize.x;
109 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
112 me.focusedItemAlpha =
getFadedAlpha(me.focusedItemAlpha, SKINALPHA_LISTBOX_FOCUSED, SKINFADEALPHA_LISTBOX_FOCUSED);
113 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_FOCUSED, me.focusedItemAlpha);
116 s = me.demoName(me,i);
118 draw_Text(me.realUpperMargin *
eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize -
draw_TextWidth(s, 0, me.realFontSize))) *
eX, s, me.realFontSize, SKINCOLOR_TEXT, SKINALPHA_TEXT, 1);
129 me.setSelected(me, 0);
139 me.filterString =
strzone(box.text);
152 s = me.demoName(me, me.selectedItem);
153 s = strdecolorize(s);
155 localcmd(
"playdemo \"demos/", s,
".dem\" \nwait \ntogglemenu\n");
161 s = me.demoName(me, me.selectedItem);
162 s = strdecolorize(s);
164 localcmd(
"timedemo \"demos/", s,
".dem\" \nwait \ntogglemenu\n");
177 main.demostartconfirmDialog,
178 boxToGlobal(
eY * (me.selectedItem * me.itemHeight - me.scrollPos), me.origin, me.size),
void XonoticDemoList_showNotify(entity me)
void DialogOpenButton_Click_withCoords(entity button, entity tab, vector theOrigin, vector theSize)
void XonoticDemoList_startDemo(entity me)
void getDemos_for_ext(entity me, string ext, float subdir)
void XonoticDemoList_destroy(entity me)
void XonoticDemoList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
void XonoticDemoList_configureXonoticDemoList(entity me)
float XonoticDemoList_keyDown(entity me, float scan, float ascii, float shift)
entity makeXonoticDemoList()
void XonoticDemoList_getDemos(entity me)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void XonoticDemoList_timeDemo(entity me)
string XonoticDemoList_demoName(entity me, float i)
void DemoList_Filter_Change(entity box, entity me)
ERASEABLE string rgb_to_hexcolor(vector rgb)
void XonoticDemoList_drawListBoxItem(entity me, int i, vector absSize, bool isSelected, bool isFocused)
void DemoConfirm_ListClick_Check_Gamestatus(entity me)
void DemoList_Refresh_Click(entity btn, entity me)
void XonoticDemoList_doubleClickListBoxItem(entity me, float i, vector where)