1 #include "scrollpanel.qh"
3 METHOD(XonoticScrollPanel, drawListBoxItem, void(XonoticScrollPanel this, int i, vector absSize, bool isSelected, bool isFocused))
5 XonoticTab p = this.currentPanel;
9 METHOD(XonoticScrollPanel, resizeNotify, void(XonoticScrollPanel this, vector relOrigin, vector relSize, vector absOrigin, vector absSize))
11 SUPER(XonoticScrollPanel).resizeNotify(this, relOrigin, relSize, absOrigin, absSize);
12 this.scrollToItem(this, 0);
13 XonoticTab p = this.currentPanel;
14 float m = p.firstChild.rows / this.viewportHeight;
18 p.resizeNotify(p, relOrigin, relSize, absOrigin, absSize);
22 METHOD(XonoticScrollPanel, x, bool(XonoticScrollPanel this, vector pos)) \
24 SUPER(XonoticScrollPanel).x(this, pos); \
25 XonoticTab p = this.currentPanel; \
26 this.setFocus(this, p); \
28 vector o = -eY * this.scrollPos; \
29 vector s = eX * (1 - this.controlWidth) + eY * this.itemHeight; \
30 return p.x(p, globalToBox(pos, o, s)); \
39 METHOD(XonoticScrollPanel, x, bool(XonoticScrollPanel this, int key, int ascii, bool shift)) \
41 XonoticTab p = this.currentPanel; \
42 return p.x(p, key, ascii, shift) || SUPER(XonoticScrollPanel).x(this, key, ascii, shift); \