#ifdef INTERFACE CLASS(VoretListBox) EXTENDS(ListBox) METHOD(VoretListBox, configureVoretListBox, void(entity)) ATTRIB(VoretListBox, fontSize, float, SKINFONTSIZE_NORMAL) ATTRIB(VoretListBox, scrollbarWidth, float, SKINWIDTH_SCROLLBAR) ATTRIB(VoretListBox, src, string, SKINGFX_SCROLLBAR) ATTRIB(VoretListBox, tolerance, vector, SKINTOLERANCE_SLIDER) ATTRIB(VoretListBox, rowsPerItem, float, 1) METHOD(VoretListBox, resizeNotify, void(entity, vector, vector, vector, vector)) ATTRIB(VoretListBox, color, vector, SKINCOLOR_SCROLLBAR_N) ATTRIB(VoretListBox, colorF, vector, SKINCOLOR_SCROLLBAR_F) ATTRIB(VoretListBox, color2, vector, SKINCOLOR_SCROLLBAR_S) ATTRIB(VoretListBox, colorC, vector, SKINCOLOR_SCROLLBAR_C) ATTRIB(VoretListBox, colorBG, vector, SKINCOLOR_LISTBOX_BACKGROUND) ATTRIB(VoretListBox, alphaBG, float, SKINALPHA_LISTBOX_BACKGROUND) ENDCLASS(VoretListBox) entity makeVoretListBox(); #endif #ifdef IMPLEMENTATION entity makeVoretListBox() { entity me; me = spawnVoretListBox(); me.configureVoretListBox(me); return me; } void configureVoretListBoxVoretListBox(entity me) { me.configureListBox(me, me.scrollbarWidth, 1); // item height gets set up later } void resizeNotifyVoretListBox(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.itemHeight = me.rowsPerItem * me.fontSize / absSize_y; resizeNotifyListBox(me, relOrigin, relSize, absOrigin, absSize); } #endif