3 #include "../gamesettings.qh" 16 if (returns) returns(it.titleTooltip);
25 XonoticRegisteredSettingsList_cb_name = _name;
29 XonoticRegisteredSettingsList_cb_tooltip = _tooltip;
34 if (!this.source)
return;
38 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
39 }
else if (isFocused) {
40 this.focusedItemAlpha =
getFadedAlpha(this.focusedItemAlpha, SKINALPHA_LISTBOX_FOCUSED, SKINFADEALPHA_LISTBOX_FOCUSED);
41 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_FOCUSED, this.focusedItemAlpha);
44 draw_Text(this.realUpperMargin *
eY + (0.5 * this.realFontSize.x) *
eX, s,
this.realFontSize,
'1 1 1', SKINALPHA_TEXT, 0);
49 if (this.focusedItem == -1 || !this.source)
72 this.nItems = this.source.reload(this.source, this.stringFilter);
78 this.itemAbsSize =
'0 0 0';
79 this.realFontSize_y = this.fontSize / (this.itemAbsSize_y = (absSize.y * this.itemHeight));
80 this.realFontSize_x = this.fontSize / (this.itemAbsSize_x = (absSize.x * (1 - this.controlWidth)));
81 this.realUpperMargin = 0.5 * (1 - this.realFontSize.y);
86 this.onChange(
this, this.onChangeEntity);
90 this.source = _source;
91 this.configureXonoticListBox(
this);
98 entity c = this.currentPanel;
99 if (c.classname ==
"XonoticScrollPanel")
101 s = this.currentPanel;
102 s.viewportHeight = 15.5;
106 entity removing = this.currentItem;
108 entity adding = data.getEntry(data, this.topicList.selectedItem,
func_null);
109 if (removing == adding)
return;
111 this.currentItem =
NULL;
112 c.removeItem(c, removing);
115 this.currentItem = adding;
116 adding.resizeNotify(adding,
'0 0 0', c.size,
'0 0 0', c.size);
117 c.addItem(c, adding,
'0 0 0',
'1 1 0', 1);
119 s.resizeNotify(s,
'0 0 0', s.size,
'0 0 0', s.size);
124 entity topics = this.topicList;
125 topics.onChange = this.topicChangeNotify;
126 topics.onChangeEntity =
this;
130 this.gotoRC(
this, 0, col);
131 this.TD(
this, this.rows, width, topics);
133 col += width, width = this.columns - col;
134 this.gotoRC(
this, 0, col); this.setFirstColumn(
this, this.currentColumn);
135 this.TD(
this, this.rows, width, this.currentPanel);
137 this.topicChangeNotify(topics,
this);
#define REGISTRY_GET(id, i)
void XonoticRegisteredSettingsList_getTooltip_cb(string _tooltip)
#define METHOD(cname, name, prototype)
#define CONSTRUCT(cname,...)
string XonoticRegisteredSettingsList_cb_tooltip
#define REGISTRY_COUNT(id)
string XonoticRegisteredSettingsList_cb_name
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void XonoticRegisteredSettingsList_getNameIcon_cb(string _name, string _icon)
#define CONSTRUCTOR(cname,...)