Xonotic
dialog_hudsetup_exit.qc File Reference
#include "dialog_hudsetup_exit.qh"
#include "textlabel.qh"
#include "button.qh"
#include "textslider.qh"
#include "inputbox.qh"
#include "hudskinlist.qh"
#include "colorpicker_string.qh"
#include "checkbox.qh"
#include "commandbutton.qh"
+ Include dependency graph for dialog_hudsetup_exit.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void XonoticHUDExitDialog_fill (entity me)
 

Function Documentation

◆ XonoticHUDExitDialog_fill()

void XonoticHUDExitDialog_fill ( entity  me)

Definition at line 12 of file dialog_hudsetup_exit.qc.

References entity(), hudskinlist, makeXonoticHeaderLabel(), and makeXonoticHUDSkinList().

13 {
14  entity e;
15  int i;
17 
18  me.TR(me);
19  me.TD(me, 1, 4, makeXonoticHeaderLabel(_("HUD skins")));
20  me.TR(me);
21  me.TDempty(me, 0.2);
22  me.TD(me, 1, 0.7, e = makeXonoticTextLabel(0.5, _("Filter:")));
23  me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
24  e.onChange = HUDSkinList_Filter_Change;
25  e.onChangeEntity = hudskinlist;
26  me.TR(me);
27  me.TD(me, 12, 4, hudskinlist);
28  me.gotoRC(me, me.rows - 4, 0);
29  me.TDempty(me, 0.2);
30  me.TD(me, 1, 1.4, e = makeXonoticButton(_("Refresh"), '0 0 0'));
31  e.onClick = HUDSkinList_Refresh_Click;
32  e.onClickEntity = hudskinlist;
33  me.TD(me, 1, 2.2, e = makeXonoticButton(_("Set skin"), '0 0 0'));
34  e.onClick = SetHUDSkin_Click;
35  e.onClickEntity = hudskinlist;
36  me.gotoRC(me, me.rows - 2.5, 0);
37  me.TD(me, 1, 2, e = makeXonoticButton_T(_("Save current skin"), '0 0 0',
38  "Note: HUD skins are saved in data/data/ directory and can be manually renamed/deleted from there"));
39  e.onClick = SaveHUDSkin_Click;
40  e.onClickEntity = hudskinlist;
41  me.TD(me, 1, 2, e = makeXonoticInputBox(0, string_null));
42  e.onChange = HUDSkinList_SavedName_Change;
43  e.onChangeEntity = hudskinlist;
44 
45  me.gotoRC(me, 0, 4.2); me.setFirstColumn(me, me.currentColumn);
46  me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Panel background defaults:")));
47  me.TR(me);
48  me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:")));
49  me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg"));
50  e.addValue(e, _("Disable"), "0");
51  e.addValue(e, "border_default", "border_default"); // this is a file name!
52  e.configureXonoticTextSliderValues(e);
53  me.TR(me);
54  me.TDempty(me, 0.2);
55  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
56  me.TD(me, 2, 2.6, e = makeXonoticColorpickerString("hud_panel_bg_color", "hud_panel_bg_color"));
57  me.TR(me);
58  me.TR(me);
59  me.TDempty(me, 0.2);
60  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:")));
61  me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_border"));
62  e.addValue(e, _("Disable"), "0");
63  for(i = 1; i <= 10; ++i)
64  e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
65  e.configureXonoticTextSliderValues(e);
66  me.TR(me);
67  me.TDempty(me, 0.2);
68  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
69  me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_alpha"));
70  for(i = 1; i <= 10; ++i)
71  e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
72  e.configureXonoticTextSliderValues(e);
73  me.TR(me);
74  me.TDempty(me, 0.2);
75  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team color:")));
76  me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_color_team"));
77  e.addValue(e, _("Disable"), "0");
78  for(i = 1; i <= 10; ++i)
79  e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
80  e.configureXonoticTextSliderValues(e);
81  me.TR(me);
82  me.TDempty(me, 0.4);
83  me.TD(me, 1, 3.6, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test team color in configure mode")));
84  me.TR(me);
85  me.TDempty(me, 0.2);
86  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:")));
87  me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_padding"));
88  for(i = 0; i <= 10; ++i)
89  e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
90  e.configureXonoticTextSliderValues(e);
91 
92  me.TR(me);
93  me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("HUD Dock:")));
94  me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock"));
95  e.addValue(e, ZCTX(_("DOCK^Disabled")), "0");
96  e.addValue(e, ZCTX(_("DOCK^Small")), "dock_small");
97  e.addValue(e, ZCTX(_("DOCK^Medium")), "dock_medium");
98  e.addValue(e, ZCTX(_("DOCK^Large")), "dock_large");
99  e.configureXonoticTextSliderValues(e);
100  me.TR(me);
101  me.TDempty(me, 0.2);
102  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
103  me.TD(me, 2, 2.6, e = makeXonoticColorpickerString("hud_dock_color", "hud_dock_color"));
104  me.TR(me);
105  me.TR(me);
106  me.TDempty(me, 0.2);
107  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
108  me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock_alpha"));
109  for(i = 1; i <= 10; ++i)
110  e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
111  e.configureXonoticTextSliderValues(e);
112  me.TR(me);
113  me.TDempty(me, 0.2);
114  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team color:")));
115  me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock_color_team"));
116  e.addValue(e, _("Disable"), "0");
117  for(i = 1; i <= 10; ++i)
118  e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
119  e.configureXonoticTextSliderValues(e);
120  me.TR(me);
121  me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Grid settings:")));
122  me.TR(me);
123  me.TDempty(me, 0.2);
124  me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_configure_grid", _("Snap panels to grid")));
125  me.TR(me);
126  me.TDempty(me, 0.2);
127  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Grid size:")));
128  setDependent(e, "hud_configure_grid", 1, 1);
129  me.TD(me, 1, 0.2, e = makeXonoticTextLabel(0, _("X:")));
130  setDependent(e, "hud_configure_grid", 1, 1);
131  me.TD(me, 1, 1.1, e = makeXonoticTextSlider("hud_configure_grid_xsize"));
132  for(i = 1; i <= 14; ++i)
133  e.addValue(e, strzone(sprintf("%.1f%%", i/2)), strzone(ftos(i/200)));
134  e.configureXonoticTextSliderValues(e);
135  setDependent(e, "hud_configure_grid", 1, 1);
136  me.TD(me, 1, 0.2, e = makeXonoticTextLabel(0, _("Y:")));
137  setDependent(e, "hud_configure_grid", 1, 1);
138  me.TD(me, 1, 1.1, e = makeXonoticTextSlider("hud_configure_grid_ysize"));
139  for(i = 1; i <= 14; ++i)
140  e.addValue(e, strzone(sprintf("%.1f%%", i/2)), strzone(ftos(i/200)));
141  e.configureXonoticTextSliderValues(e);
142  setDependent(e, "hud_configure_grid", 1, 1);
143 
144  me.gotoRC(me, me.rows - 1, 0);
145  me.TD(me, 1, me.columns, e = makeXonoticCommandButton(_("Exit setup"), '0 0 0', "_hud_configure 0", COMMANDBUTTON_CLOSE));
146 }
void HUDSkinList_Filter_Change(entity box, entity me)
Definition: hudskinlist.qc:199
ERASEABLE string ftos_decimals(float number, int decimals)
converts a number to a string with the indicated number of decimals
Definition: string.qh:450
entity hudskinlist
Definition: hudskinlist.qh:33
string string_null
Definition: nil.qh:9
void HUDSkinList_SavedName_Change(entity box, entity me)
Definition: hudskinlist.qc:191
void SaveHUDSkin_Click(entity btn, entity me)
Definition: hudskinlist.qc:214
entity makeXonoticHeaderLabel(string theText)
Definition: textlabel.qc:10
entity() spawn
entity makeXonoticTextLabel(float theAlign, string theText)
Definition: textlabel.qc:3
#define COMMANDBUTTON_CLOSE
#define ZCTX(s)
Definition: i18n.qh:68
void HUDSkinList_Refresh_Click(entity btn, entity me)
Definition: hudskinlist.qc:185
entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar)
entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags)
entity makeXonoticTextSlider(string theCvar)
Definition: textslider.qc:10
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition: checkbox.qc:28
entity makeXonoticHUDSkinList()
Definition: hudskinlist.qc:5
void SetHUDSkin_Click(entity btn, entity me)
Definition: hudskinlist.qc:239
entity makeXonoticInputBox(float doEditColorCodes, string theCvar)
Definition: inputbox.qc:10
+ Here is the call graph for this function: