2 CLASS(XonoticHUDExitDialog) EXTENDS(XonoticRootDialog)
3 METHOD(XonoticHUDExitDialog, fill, void(entity))
4 ATTRIB(XonoticHUDExitDialog, title, string, "Panel HUD Setup")
5 ATTRIB(XonoticHUDExitDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
6 ATTRIB(XonoticHUDExitDialog, intendedWidth, float, 0.4)
7 ATTRIB(XonoticHUDExitDialog, rows, float, 20)
8 ATTRIB(XonoticHUDExitDialog, columns, float, 4)
9 ATTRIB(XonoticHUDExitDialog, name, string, "HUDExit")
10 ENDCLASS(XonoticHUDExitDialog)
15 void XonoticHUDExitDialog_fill(entity me)
21 me.TD(me, 1, 4, makeXonoticTextLabel(0, "Panel background defaults:"));
23 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Background:"));
26 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
27 me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_bg_color"));
28 setDependentStringNotEqual(e, "hud_panel_bg_color", "");
32 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
33 me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_border"));
34 e.addValue(e, "Disable", "0");
35 for(i = 1; i <= 10; ++i)
36 e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
37 e.configureXonoticTextSliderValues(e);
40 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
41 me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_alpha"));
42 for(i = 1; i <= 10; ++i)
43 e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
44 e.configureXonoticTextSliderValues(e);
47 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team color:"));
48 me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_color_team"));
49 e.addValue(e, "Disable", "0");
50 for(i = 1; i <= 10; ++i)
51 e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
52 e.configureXonoticTextSliderValues(e);
55 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
58 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
59 me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_padding"));
60 for(i = 0; i <= 10; ++i)
61 e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
62 e.configureXonoticTextSliderValues(e);
65 me.TD(me, 1, 4, makeXonoticTextLabel(0, "Dock settings:"));
68 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Alpha:"));
69 me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock_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);
75 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Team color:"));
76 me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock_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);
82 me.TD(me, 1, 4, makeXonoticTextLabel(0, "Grid settings:"));
85 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_grid", "Snap panels to grid"));
88 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Grid size:"));
89 me.TD(me, 1, 0.2, e = makeXonoticTextLabel(0, "X:"));
90 me.TD(me, 1, 1.1, e = makeXonoticTextSlider("hud_configure_grid_xsize"));
91 for(i = 1; i <= 14; ++i)
92 e.addValue(e, strzone(ftos_decimals(i/200, 3)), strzone(ftos(i/200)));
93 e.configureXonoticTextSliderValues(e);
94 setDependent(e, "hud_configure_grid", 1, 1);
95 me.TD(me, 1, 0.2, e = makeXonoticTextLabel(0, "Y:"));
96 me.TD(me, 1, 1.1, e = makeXonoticTextSlider("hud_configure_grid_ysize"));
97 for(i = 1; i <= 14; ++i)
98 e.addValue(e, strzone(ftos_decimals(i/200, 3)), strzone(ftos(i/200)));
99 e.configureXonoticTextSliderValues(e);
100 setDependent(e, "hud_configure_grid", 1, 1);
102 me.gotoRC(me, me.rows - 1, 0);
103 me.TD(me, 1, me.columns, e = makeXonoticCommandButton("Exit setup", '0 0 0', "_hud_configure 0", 1));