Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
scrollpanel.qc File Reference
#include "scrollpanel.qh"
Include dependency graph for scrollpanel.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define X(keyFunc)
#define X(mouseFunc)

Macro Definition Documentation

◆ X [1/2]

#define X ( keyFunc)
Value:
METHOD(XonoticScrollPanel, keyFunc, bool(XonoticScrollPanel this, int key, int ascii, bool shift)) \
{ \
XonoticTab p = this.currentPanel; \
return p.keyFunc(p, key, ascii, shift) || SUPER(XonoticScrollPanel).keyFunc(this, key, ascii, shift); \
}
#define SUPER(cname)
Definition oo.qh:231
#define METHOD(cname, name, prototype)
Definition oo.qh:269

Definition at line 21 of file scrollpanel.qc.

21#define X(mouseFunc) \
22METHOD(XonoticScrollPanel, mouseFunc, bool(XonoticScrollPanel this, vector pos)) \
23{ \
24 SUPER(XonoticScrollPanel).mouseFunc(this, pos); \
25 XonoticTab p = this.currentPanel; \
26 this.setFocus(this, p); \
27 \
28 vector o = -eY * this.scrollPos; \
29 vector s = eX * (1 - this.controlWidth) + eY * this.itemHeight; \
30 return p.mouseFunc(p, globalToBox(pos, o, s)); \
31}

◆ X [2/2]

#define X ( mouseFunc)
Value:
METHOD(XonoticScrollPanel, mouseFunc, bool(XonoticScrollPanel this, vector pos)) \
{ \
SUPER(XonoticScrollPanel).mouseFunc(this, pos); \
XonoticTab p = this.currentPanel; \
this.setFocus(this, p); \
\
vector o = -eY * this.scrollPos; \
vector s = eX * (1 - this.controlWidth) + eY * this.itemHeight; \
return p.mouseFunc(p, globalToBox(pos, o, s)); \
}
vector globalToBox(vector v, vector theOrigin, vector theScale)
Definition draw.qc:30
vector
Definition self.qh:92
const vector eY
Definition vector.qh:45
const vector eX
Definition vector.qh:44

Definition at line 21 of file scrollpanel.qc.

21#define X(mouseFunc) \
22METHOD(XonoticScrollPanel, mouseFunc, bool(XonoticScrollPanel this, vector pos)) \
23{ \
24 SUPER(XonoticScrollPanel).mouseFunc(this, pos); \
25 XonoticTab p = this.currentPanel; \
26 this.setFocus(this, p); \
27 \
28 vector o = -eY * this.scrollPos; \
29 vector s = eX * (1 - this.controlWidth) + eY * this.itemHeight; \
30 return p.mouseFunc(p, globalToBox(pos, o, s)); \
31}