Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
label.qh
Go to the documentation of this file.
1
#pragma once
2
3
#include "
../item.qh
"
4
CLASS
(
Label
,
MenuItem
)
5
METHOD
(
Label
,
configureLabel
,
void
(
entity
,
string
,
float
,
float
));
6
METHOD
(
Label
,
draw
,
void
(
entity
));
7
METHOD
(
Label
,
resizeNotify
,
void
(
entity
,
vector
,
vector
,
vector
,
vector
));
8
METHOD
(
Label
,
setText
,
void
(
entity
,
string
));
9
METHOD
(
Label
,
toString
,
string
(
entity
));
10
METHOD
(
Label
,
recalcPositionWithText
,
void
(
entity
,
string
));
11
ATTRIB
(
Label
,
isBold
,
bool
,
false
);
12
ATTRIB
(
Label
, text,
string
);
13
ATTRIB
(
Label
, currentText,
string
);
14
ATTRIB
(
Label
,
fontSize
,
float
, 8);
15
ATTRIB
(
Label
,
align
,
float
, 0.5);
16
ATTRIB
(
Label
,
allowCut
,
bool
,
false
);
17
ATTRIB
(
Label
,
allowColors
,
bool
,
false
);
18
ATTRIB
(
Label
,
keepspaceLeft
,
float
, 0);
// for use by subclasses (radiobuttons for example);
19
ATTRIB
(
Label
,
keepspaceRight
,
float
, 0);
20
ATTRIB
(
Label
,
marginLeft
,
float
, 0);
// alternate way to specify keepspace* (in characters from the font);
21
ATTRIB
(
Label
,
marginRight
,
float
, 0);
22
ATTRIB
(
Label
,
realFontSize
,
vector
, '0 0 0');
23
ATTRIB
(
Label
,
realOrigin
,
vector
, '0 0 0');
24
ATTRIB
(
Label
,
alpha
,
float
, 0.7);
25
ATTRIB
(
Label
,
colorL
,
vector
, SKINCOLOR_TEXT);
26
ATTRIB
(
Label
,
disabled
,
float
, 0);
27
ATTRIB
(
Label
,
disabledAlpha
,
float
, 0.3);
28
ATTRIB
(
Label
, textEntity,
entity
);
29
// if allowWrap is enabled text is wrapped on multiple lines and can't be condensed;
30
// lines are centered vertically and are allowed to extend outside the item box
31
// so there should be some free space above and below the item
32
ATTRIB
(
Label
,
allowWrap
,
bool
,
false
);
33
ATTRIB
(
Label
,
allowWrap_spacing
,
float
, 0);
34
ATTRIB
(
Label
,
recalcPos
,
bool
,
false
);
35
ATTRIB
(
Label
,
condenseFactor
,
float
, 1);
36
ATTRIB
(
Label
,
overrideRealOrigin
,
vector
, '0 0 0');
37
ATTRIB
(
Label
,
overrideCondenseFactor
,
bool
,
false
);
38
ENDCLASS
(
Label
)
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Label
Definition
label.qh:4
Label::realOrigin
vector realOrigin
Definition
label.qh:23
Label::isBold
bool isBold
Definition
label.qh:11
Label::recalcPositionWithText
virtual void recalcPositionWithText()
Label::colorL
vector colorL
Definition
label.qh:25
Label::configureLabel
virtual void configureLabel()
Label::marginLeft
float marginLeft
Definition
label.qh:20
Label::realFontSize
vector realFontSize
Definition
label.qh:22
Label::allowWrap_spacing
float allowWrap_spacing
Definition
label.qh:33
Label::allowCut
bool allowCut
Definition
label.qh:16
Label::condenseFactor
float condenseFactor
Definition
label.qh:35
Label::align
float align
Definition
label.qh:15
Label::alpha
float alpha
Definition
label.qh:24
Label::toString
virtual void toString()
Label::keepspaceLeft
float keepspaceLeft
Definition
label.qh:18
Label::overrideRealOrigin
vector overrideRealOrigin
Definition
label.qh:36
Label::ATTRIB
ATTRIB(Label, text, string)
Label::allowWrap
bool allowWrap
Definition
label.qh:32
Label::allowColors
bool allowColors
Definition
label.qh:17
Label::marginRight
float marginRight
Definition
label.qh:21
Label::recalcPos
bool recalcPos
Definition
label.qh:34
Label::disabled
float disabled
Definition
label.qh:26
Label::fontSize
float fontSize
Definition
label.qh:14
Label::disabledAlpha
float disabledAlpha
Definition
label.qh:27
Label::resizeNotify
virtual void resizeNotify()
Label::keepspaceRight
float keepspaceRight
Definition
label.qh:19
Label::draw
virtual void draw()
Label::setText
virtual void setText()
Label::overrideCondenseFactor
bool overrideCondenseFactor
Definition
label.qh:37
MenuItem
Definition
item.qh:8
false
#define false
Definition
csprogsdefs.qh:6
item.qh
CLASS
#define CLASS(...)
Definition
oo.qh:145
ENDCLASS
#define ENDCLASS(cname)
Definition
oo.qh:281
METHOD
#define METHOD(cname, name, prototype)
Definition
oo.qh:269
vector
vector
Definition
self.qh:92
menu
item
label.qh
Generated on
for Xonotic QuakeC by
1.14.0