Xonotic
demolist.qh File Reference
#include "mainwindow.qh"
#include "listbox.qh"
+ Include dependency graph for demolist.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  XonoticDemoList
 

Functions

void DemoList_Filter_Change (entity box, entity me)
 
void DemoList_Refresh_Click (entity btn, entity me)
 
entity makeXonoticDemoList ()
 

Variables

entity demolist
 

Function Documentation

◆ DemoList_Filter_Change()

void DemoList_Filter_Change ( entity  box,
entity  me 
)

Definition at line 132 of file demolist.qc.

References strcat(), strfree, string_null, strstrofs, and strzone().

133 {
134  strfree(me.filterString);
135 
136  if(box.text != "")
137  {
138  if (strstrofs(box.text, "*", 0) >= 0 || strstrofs(box.text, "?", 0) >= 0)
139  me.filterString = strzone(box.text);
140  else
141  me.filterString = strzone(strcat("*", box.text, "*"));
142  }
143  else
144  me.filterString = string_null;
145 
146  me.getDemos(me);
147 }
string string_null
Definition: nil.qh:9
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"))
#define strstrofs
Definition: dpextensions.qh:42
#define strfree(this)
Definition: string.qh:56
+ Here is the call graph for this function:

◆ DemoList_Refresh_Click()

void DemoList_Refresh_Click ( entity  btn,
entity  me 
)

Definition at line 126 of file demolist.qc.

127 {
128  me.getDemos(me);
129  me.setSelected(me, 0); //always select the first element after a list update
130 }

◆ makeXonoticDemoList()

entity makeXonoticDemoList ( )

Definition at line 5 of file demolist.qc.

References entity(), and NEW.

Referenced by XonoticDemoBrowserTab_fill().

6 {
7  entity me;
8  me = NEW(XonoticDemoList);
9  me.configureXonoticDemoList(me);
10  return me;
11 }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ demolist