2 CLASS(XonoticHUDEngineInfoDialog) EXTENDS(XonoticRootDialog)
3 METHOD(XonoticHUDEngineInfoDialog, fill, void(entity))
4 ATTRIB(XonoticHUDEngineInfoDialog, title, string, "Engine Info Panel")
5 ATTRIB(XonoticHUDEngineInfoDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
6 ATTRIB(XonoticHUDEngineInfoDialog, intendedWidth, float, 0.4)
7 ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15)
8 ATTRIB(XonoticHUDEngineInfoDialog, columns, float, 4)
9 ATTRIB(XonoticHUDEngineInfoDialog, name, string, "HUDengineinfo")
10 ENDCLASS(XonoticHUDEngineInfoDialog)
14 void XonoticHUDEngineInfoDialog_fill(entity me)
17 string panelname = "engineinfo";
21 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo", "Enable panel"));
23 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
24 me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
25 e.addValue(e, "Default", "");
26 e.addValue(e, "Disable", "0");
27 e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
28 e.configureXonoticTextSliderValues(e);
31 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
32 me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
33 setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
36 me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
39 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
40 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
41 e.addValue(e, "Default", "");
42 e.addValue(e, "Disable", "0");
43 for(i = 1; i <= 10; ++i)
44 e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
45 e.configureXonoticTextSliderValues(e);
48 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
49 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
50 e.addValue(e, "Default", "");
51 for(i = 1; i <= 10; ++i)
52 e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
53 e.configureXonoticTextSliderValues(e);
56 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
57 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
58 e.addValue(e, "Default", "");
59 e.addValue(e, "Disable", "0");
60 for(i = 1; i <= 10; ++i)
61 e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
62 e.configureXonoticTextSliderValues(e);
65 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
68 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
69 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
70 e.addValue(e, "Default", "");
71 for(i = 0; i <= 10; ++i)
72 e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
73 e.configureXonoticTextSliderValues(e);
75 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Engine info:"));
78 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo_framecounter_exponentialmovingaverage", "Use an averaging algorithm for fps"));