2 CLASS(VoretListBox) EXTENDS(ListBox)
\r
3 METHOD(VoretListBox, configureVoretListBox, void(entity))
\r
4 ATTRIB(VoretListBox, fontSize, float, SKINFONTSIZE_NORMAL)
\r
5 ATTRIB(VoretListBox, scrollbarWidth, float, SKINWIDTH_SCROLLBAR)
\r
6 ATTRIB(VoretListBox, src, string, SKINGFX_SCROLLBAR)
\r
7 ATTRIB(VoretListBox, tolerance, vector, SKINTOLERANCE_SLIDER)
\r
8 ATTRIB(VoretListBox, rowsPerItem, float, 1)
\r
9 METHOD(VoretListBox, resizeNotify, void(entity, vector, vector, vector, vector))
\r
10 ATTRIB(VoretListBox, color, vector, SKINCOLOR_SCROLLBAR_N)
\r
11 ATTRIB(VoretListBox, colorF, vector, SKINCOLOR_SCROLLBAR_F)
\r
12 ATTRIB(VoretListBox, color2, vector, SKINCOLOR_SCROLLBAR_S)
\r
13 ATTRIB(VoretListBox, colorC, vector, SKINCOLOR_SCROLLBAR_C)
\r
14 ATTRIB(VoretListBox, colorBG, vector, SKINCOLOR_LISTBOX_BACKGROUND)
\r
15 ATTRIB(VoretListBox, alphaBG, float, SKINALPHA_LISTBOX_BACKGROUND)
\r
16 ENDCLASS(VoretListBox)
\r
17 entity makeVoretListBox();
\r
20 #ifdef IMPLEMENTATION
\r
21 entity makeVoretListBox()
\r
24 me = spawnVoretListBox();
\r
25 me.configureVoretListBox(me);
\r
28 void configureVoretListBoxVoretListBox(entity me)
\r
30 me.configureListBox(me, me.scrollbarWidth, 1); // item height gets set up later
\r
32 void resizeNotifyVoretListBox(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
\r
34 me.itemHeight = me.rowsPerItem * me.fontSize / absSize_y;
\r
35 resizeNotifyListBox(me, relOrigin, relSize, absOrigin, absSize);
\r