Xonotic
button.qh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "modalcontroller.qh"
4 
5 #include "label.qh"
7  METHOD(Button, configureButton, void(entity, string, float, string));
8  METHOD(Button, draw, void(entity));
9  METHOD(Button, showNotify, void(entity));
10  METHOD(Button, resizeNotify, void(entity, vector, vector, vector, vector));
11  METHOD(Button, keyDown, float(entity, float, float, float));
12  METHOD(Button, mousePress, bool(Button this, vector pos));
13  METHOD(Button, mouseDrag, float(entity, vector));
14  METHOD(Button, mouseRelease, float(entity, vector));
15  METHOD(Button, playClickSound, void(entity));
16  ATTRIB(Button, onClick, void(entity, entity));
17  ATTRIB(Button, onClickEntity, entity);
18  ATTRIB(Button, src, string);
19  ATTRIB(Button, srcSuffix, string);
20  ATTRIB(Button, src2, string); // is centered, same aspect, and stretched to label size
21  ATTRIB(Button, src2scale, float, 1);
22  ATTRIB(Button, srcMulti, float, 1); // 0: button square left, text right; 1: button stretched, text over it
23  ATTRIB(Button, buttonLeftOfText, float, 0);
24  ATTRIB(Button, focusable, float, 1);
25  ATTRIB(Button, allowFocusSound, float, 1);
26  ATTRIB(Button, pressed, float, 0);
27  ATTRIB(Button, clickTime, float, 0);
29  ATTRIB(Button, disableOnClick, bool, false);
30  ATTRIB(Button, disabled, float, 0);
31  ATTRIB(Button, disabledAlpha, float, 0.3);
32  ATTRIB(Button, forcePressed, float, 0);
33  ATTRIB(Button, color, vector, '1 1 1');
34  ATTRIB(Button, colorC, vector, '1 1 1');
35  ATTRIB(Button, colorF, vector, '1 1 1');
36  ATTRIB(Button, colorD, vector, '1 1 1');
37  ATTRIB(Button, color2, vector, '1 1 1');
38  ATTRIB(Button, alpha2, float, 1);
39 
40  ATTRIB(Button, origin, vector, '0 0 0');
41  ATTRIB(Button, size, vector, '0 0 0');
vector color
CLASS(Object) Object
Definition: oo.qh:318
entity() spawn
Definition: button.qh:6
bool disabled
origin
Definition: ent_cs.qc:114
#define METHOD(cname, name, prototype)
Definition: oo.qh:257
vector size
Definition: csprogsdefs.qc:114
#define ATTRIB(...)
Definition: oo.qh:136
entity applyButton
Definition: slider.qc:6
Definition: label.qh:4
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector colorC
Definition: borderimage.qh:25
#define ENDCLASS(cname)
Definition: oo.qh:269
bool pressed
Definition: picker.qc:3
vector colorF
Definition: borderimage.qh:25