2 CLASS(XonoticHUDPressedKeysDialog) EXTENDS(XonoticRootDialog)
3 METHOD(XonoticHUDPressedKeysDialog, fill, void(entity))
4 ATTRIB(XonoticHUDPressedKeysDialog, title, string, "Pressed Keys Panel")
5 ATTRIB(XonoticHUDPressedKeysDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
6 ATTRIB(XonoticHUDPressedKeysDialog, intendedWidth, float, 0.4)
7 ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15)
8 ATTRIB(XonoticHUDPressedKeysDialog, columns, float, 4)
9 ATTRIB(XonoticHUDPressedKeysDialog, name, string, "HUDpressedkeys")
10 ENDCLASS(XonoticHUDPressedKeysDialog)
14 void XonoticHUDPressedKeysDialog_fill(entity me)
17 string panelname = "pressedkeys";
21 me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_panel_pressedkeys"));
22 e.addValue(e, "Panel disabled", "0");
23 e.addValue(e, "Panel enabled when spectating", "1");
24 e.addValue(e, "Panel always enabled", "2");
25 e.configureXonoticTextSliderValues(e);
27 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Background:"));
30 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
31 me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
32 setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
35 me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
38 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
39 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
40 e.addValue(e, "Default", "");
41 e.addValue(e, "Disable", "0");
42 for(i = 1; i <= 10; ++i)
43 e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
44 e.configureXonoticTextSliderValues(e);
47 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
48 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
49 e.addValue(e, "Default", "");
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, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
56 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
57 e.addValue(e, "Default", "");
58 e.addValue(e, "Disable", "0");
59 for(i = 1; i <= 10; ++i)
60 e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
61 e.configureXonoticTextSliderValues(e);
64 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
67 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
68 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
69 e.addValue(e, "Default", "");
70 for(i = 0; i <= 10; ++i)
71 e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
72 e.configureXonoticTextSliderValues(e);
75 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Forced aspect:"));
76 me.TD(me, 1, 2.6, e = makeXonoticSlider(0.25, 4, 0.25, "hud_panel_pressedkeys_aspect"));