2 CLASS(XonoticListBox) EXTENDS(ListBox)
3 METHOD(XonoticListBox, configureXonoticListBox, void(entity))
4 ATTRIB(XonoticListBox, fontSize, float, SKINFONTSIZE_NORMAL)
5 ATTRIB(XonoticListBox, scrollbarWidth, float, SKINWIDTH_SCROLLBAR)
6 ATTRIB(XonoticListBox, src, string, SKINGFX_SCROLLBAR)
7 ATTRIB(XonoticListBox, tolerance, vector, SKINTOLERANCE_SLIDER)
8 ATTRIB(XonoticListBox, rowsPerItem, float, 1)
9 METHOD(XonoticListBox, resizeNotify, void(entity, vector, vector, vector, vector))
10 ATTRIB(XonoticListBox, color, vector, SKINCOLOR_SCROLLBAR_N)
11 ATTRIB(XonoticListBox, colorF, vector, SKINCOLOR_SCROLLBAR_F)
12 ATTRIB(XonoticListBox, color2, vector, SKINCOLOR_SCROLLBAR_S)
13 ATTRIB(XonoticListBox, colorC, vector, SKINCOLOR_SCROLLBAR_C)
14 ATTRIB(XonoticListBox, colorBG, vector, SKINCOLOR_LISTBOX_BACKGROUND)
15 ATTRIB(XonoticListBox, alphaBG, float, SKINALPHA_LISTBOX_BACKGROUND)
16 ENDCLASS(XonoticListBox)
17 entity makeXonoticListBox();
21 entity makeXonoticListBox()
24 me = spawnXonoticListBox();
25 me.configureXonoticListBox(me);
28 void XonoticListBox_configureXonoticListBox(entity me)
30 me.configureListBox(me, me.scrollbarWidth, 1); // item height gets set up later
32 void XonoticListBox_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
34 me.itemHeight = me.rowsPerItem * me.fontSize / absSize.y;
35 SUPER(XonoticListBox).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);