Xonotic
dialog_sandboxtools.qc
Go to the documentation of this file.
1
#include "
dialog_sandboxtools.qh
"
2
3
#include "
textlabel.qh
"
4
#include "
inputbox.qh
"
5
#include "
commandbutton.qh
"
6
#include "
colorpicker_string.qh
"
7
#include "
slider.qh
"
8
#include "
radiobutton.qh
"
9
10
void
XonoticSandboxToolsDialog_fill
(
entity
me)
11
{
12
entity
e, box;
13
14
me.TR(me);
15
me.TD(me, 1, 0.25, e =
makeXonoticTextLabel
(0, _(
"Model:"
)));
16
me.TD(me, 1, 1.5, box =
makeXonoticInputBox
(1,
"menu_sandbox_spawn_model"
));
17
box.forbiddenCharacters =
"\r\n\\\"$"
;
// don't care, isn't getting saved
18
box.maxLength = -127;
// negative means encoded length in bytes
19
box.saveImmediately = 1;
20
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Spawn"
),
'0 0 0'
,
"sandbox object_spawn \"$menu_sandbox_spawn_model\""
, 0));
21
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Remove *"
),
'0 0 0'
,
"sandbox object_remove"
, 0));
22
me.TDempty(me, 0.1);
23
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Copy *"
),
'0 0 0'
,
"sandbox object_duplicate copy cl_sandbox_clipboard"
, 0));
24
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Paste"
),
'0 0 0'
,
"sandbox object_duplicate paste \"$cl_sandbox_clipboard\""
, 0));
25
me.TR(me);
26
me.TD(me, 1, 0.25, e =
makeXonoticTextLabel
(0, _(
"Bone:"
)));
27
me.TD(me, 1, 1.5, box =
makeXonoticInputBox
(1,
"menu_sandbox_attach_bone"
));
28
box.forbiddenCharacters =
"\r\n\\\"$"
;
// don't care, isn't getting saved
29
box.maxLength = -127;
// negative means encoded length in bytes
30
box.saveImmediately = 1;
31
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set * as child"
),
'0 0 0'
,
"sandbox object_attach get"
, 0));
32
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Attach to *"
),
'0 0 0'
,
"sandbox object_attach set \"$menu_sandbox_attach_bone\""
, 0));
33
me.TDempty(me, 0.1);
34
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Detach from *"
),
'0 0 0'
,
"sandbox object_attach remove"
, 0));
35
me.TR(me);
36
me.TR(me);
37
me.TD(me, 1, 1.5, e =
makeXonoticTextLabel
(0, _(
"Visual object properties for *:"
)));
38
me.TR(me);
39
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set skin:"
),
'0 0 0'
,
"sandbox object_edit skin $menu_sandbox_edit_skin"
, 0));
40
me.TD(me, 1, 1.5, e =
makeXonoticSlider
(0, 99, 1,
"menu_sandbox_edit_skin"
));
41
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set alpha:"
),
'0 0 0'
,
"sandbox object_edit alpha $menu_sandbox_edit_alpha"
, 0));
42
me.TD(me, 1, 1.5, e =
makeXonoticSlider
(0.1, 1, 0.05,
"menu_sandbox_edit_alpha"
));
43
me.TR(me);
44
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set color main:"
),
'0 0 0'
,
"sandbox object_edit color_main \"$menu_sandbox_edit_color_main\""
, 0));
45
me.TD(me, 2, 1.5, e =
makeXonoticColorpickerString
(
"menu_sandbox_edit_color_main"
,
"menu_sandbox_edit_color_main"
));
46
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set color glow:"
),
'0 0 0'
,
"sandbox object_edit color_glow \"$menu_sandbox_edit_color_glow\""
, 0));
47
me.TD(me, 2, 1.5, e =
makeXonoticColorpickerString
(
"menu_sandbox_edit_color_glow"
,
"menu_sandbox_edit_color_glow"
));
48
me.TR(me);
49
me.TR(me);
50
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set frame:"
),
'0 0 0'
,
"sandbox object_edit frame $menu_sandbox_edit_frame"
, 0));
51
me.TD(me, 1, 1.5, e =
makeXonoticSlider
(0, 99, 1,
"menu_sandbox_edit_frame"
));
52
me.TR(me);
53
me.TR(me);
54
me.TD(me, 1, 1.5, e =
makeXonoticTextLabel
(0, _(
"Physical object properties for *:"
)));
55
me.TR(me);
56
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set material:"
),
'0 0 0'
,
"sandbox object_edit material \"$menu_sandbox_edit_material\""
, 0));
57
me.TD(me, 1, 1.5, box =
makeXonoticInputBox
(1,
"menu_sandbox_edit_material"
));
58
box.forbiddenCharacters =
"\r\n\\\"$"
;
// don't care, isn't getting saved
59
box.maxLength = -127;
// negative means encoded length in bytes
60
box.saveImmediately = 1;
61
me.TR(me);
62
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set solidity:"
),
'0 0 0'
,
"sandbox object_edit solidity $menu_sandbox_edit_solidity"
, 0));
63
me.TD(me, 1, 0.75, e =
makeXonoticRadioButton
(1,
"menu_sandbox_edit_solidity"
,
"0"
, _(
"Non-solid"
)));
64
me.TD(me, 1, 0.75, e =
makeXonoticRadioButton
(1,
"menu_sandbox_edit_solidity"
,
"1"
, _(
"Solid"
)));
65
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set physics:"
),
'0 0 0'
,
"sandbox object_edit physics $menu_sandbox_edit_physics"
, 0));
66
me.TD(me, 1, 0.5, e =
makeXonoticRadioButton
(2,
"menu_sandbox_edit_physics"
,
"0"
, _(
"Static"
)));
67
me.TD(me, 1, 0.5, e =
makeXonoticRadioButton
(2,
"menu_sandbox_edit_physics"
,
"1"
, _(
"Movable"
)));
68
me.TD(me, 1, 0.5, e =
makeXonoticRadioButton
(2,
"menu_sandbox_edit_physics"
,
"2"
, _(
"Physical"
)));
69
me.TR(me);
70
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set scale:"
),
'0 0 0'
,
"sandbox object_edit scale $menu_sandbox_edit_scale"
, 0));
71
me.TD(me, 1, 1.5, e =
makeXonoticSlider
(0.25, 2, 0.05,
"menu_sandbox_edit_scale"
));
72
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Set force:"
),
'0 0 0'
,
"sandbox object_edit force $menu_sandbox_edit_force"
, 0));
73
me.TD(me, 1, 1.5, e =
makeXonoticSlider
(0, 10, 0.5,
"menu_sandbox_edit_force"
));
74
me.TR(me);
75
me.TR(me);
76
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Claim *"
),
'0 0 0'
,
"sandbox object_claim"
, 0));
77
me.TDempty(me, 0.5);
78
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"* object info"
),
'1 1 0.5'
,
"sandbox object_info object; toggleconsole"
, 0));
79
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"* mesh info"
),
'1 1 0.5'
,
"sandbox object_info mesh; toggleconsole"
, 0));
80
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"* attachment info"
),
'1 1 0.5'
,
"sandbox object_info attachments; toggleconsole"
, 0));
81
me.TD(me, 1, 0.5, e =
makeXonoticCommandButton
(_(
"Show help"
),
'1 0.5 0.5'
,
"sandbox help; toggleconsole"
, 0));
82
me.TD(me, 1, 1, e =
makeXonoticTextLabel
(0, _(
"* is the object you are facing"
)));
83
84
me.gotoRC(me, me.rows - 1, 0);
85
me.TD(me, 1, me.columns, e =
makeXonoticButton
(_(
"OK"
),
'0 0 0'
));
86
e.onClick =
Dialog_Close
;
87
e.onClickEntity = me;
88
}
colorpicker_string.qh
makeXonoticButton
entity makeXonoticButton(string theText, vector theColor)
Definition:
button.qc:10
Dialog_Close
void Dialog_Close(entity button, entity me)
Definition:
dialog.qc:7
makeXonoticRadioButton
entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText)
Definition:
radiobutton.qc:10
entity
entity() spawn
makeXonoticTextLabel
entity makeXonoticTextLabel(float theAlign, string theText)
Definition:
textlabel.qc:3
makeXonoticSlider
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition:
slider.qc:10
inputbox.qh
slider.qh
textlabel.qh
makeXonoticColorpickerString
entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar)
Definition:
colorpicker_string.qc:5
makeXonoticCommandButton
entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags)
Definition:
commandbutton.qc:10
radiobutton.qh
commandbutton.qh
dialog_sandboxtools.qh
makeXonoticInputBox
entity makeXonoticInputBox(float doEditColorCodes, string theCvar)
Definition:
inputbox.qc:10
XonoticSandboxToolsDialog_fill
void XonoticSandboxToolsDialog_fill(entity me)
Definition:
dialog_sandboxtools.qc:10
menu
xonotic
dialog_sandboxtools.qc
Generated on Thu Mar 17 2022 17:26:29 for Xonotic by
1.8.13