2 CLASS(XonoticHUDRadarDialog) EXTENDS(XonoticRootDialog)
3 METHOD(XonoticHUDRadarDialog, fill, void(entity))
4 ATTRIB(XonoticHUDRadarDialog, title, string, "Radar Panel")
5 ATTRIB(XonoticHUDRadarDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
6 ATTRIB(XonoticHUDRadarDialog, intendedWidth, float, 0.4)
7 ATTRIB(XonoticHUDRadarDialog, rows, float, 15)
8 ATTRIB(XonoticHUDRadarDialog, columns, float, 4)
9 ATTRIB(XonoticHUDRadarDialog, name, string, "HUDradar")
10 ENDCLASS(XonoticHUDRadarDialog)
14 void XonoticHUDRadarDialog_fill(entity me)
17 string panelname = "radar";
21 me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_panel_radar"));
22 e.addValue(e, "Panel disabled", "0");
23 e.addValue(e, "Panel enabled in teamgames", "1");
24 e.addValue(e, "Panel always enabled", "2");
25 e.configureXonoticTextSliderValues(e);
27 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
28 me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
29 e.addValue(e, "Default", "");
30 e.addValue(e, "Disable", "0");
31 e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
32 e.configureXonoticTextSliderValues(e);
35 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
36 me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
37 setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
40 me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
43 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
44 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
45 e.addValue(e, "Default", "");
46 e.addValue(e, "Disable", "0");
47 for(i = 1; i <= 10; ++i)
48 e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
49 e.configureXonoticTextSliderValues(e);
52 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
53 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
54 e.addValue(e, "Default", "");
55 for(i = 1; i <= 10; ++i)
56 e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
57 e.configureXonoticTextSliderValues(e);
60 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
61 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
62 e.addValue(e, "Default", "");
63 e.addValue(e, "Disable", "0");
64 for(i = 1; i <= 10; ++i)
65 e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
66 e.configureXonoticTextSliderValues(e);
69 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
72 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
73 me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
74 e.addValue(e, "Default", "");
75 for(i = 0; i <= 10; ++i)
76 e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
77 e.configureXonoticTextSliderValues(e);
79 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Radar:"));
82 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
83 me.TD(me, 1, 2.6, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_radar_foreground_alpha"));
86 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Rotation:"));
87 me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_radar_rotation"));
88 e.addValue(e, "Forward", "0");
89 e.addValue(e, "West", "1");
90 e.addValue(e, "South", "2");
91 e.addValue(e, "East", "3");
92 e.addValue(e, "North", "4");
93 e.configureXonoticTextSliderValues(e);
96 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Scale:"));
97 me.TD(me, 1, 2.6, e = makeXonoticSlider(1024, 8192, 512, "hud_panel_radar_scale"));
100 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Zoom mode:"));
101 me.TD(me, 1, 1.6, e = makeXonoticTextSlider("hud_panel_radar_zoommode"));
102 e.addValue(e, "Zoomed in", "0");
103 e.addValue(e, "Zoomed out", "1");
104 e.addValue(e, "Always zoomed", "2");
105 e.addValue(e, "Never zoomed", "3");
106 e.configureXonoticTextSliderValues(e);