string panelname = "ammo";
float i;
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_ammo", _("Enable panel")));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:")));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Use default")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, _("Default"), "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team Color:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test the team color in HUD configure mode")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, _("Default"), "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
+ DIALOG_HUDPANEL_COMMON();
+
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Ammunition display:")));
me.TR(me);
string panelname = "chat";
float i;
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_chat", _("Enable panel")));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:")));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Use default")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, _("Default"), "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team Color:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test the team color in HUD configure mode")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, _("Default"), "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
+ DIALOG_HUDPANEL_COMMON();
+
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Chat entries:")));
me.TR(me);
string panelname = "engineinfo";
float i;
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo", _("Enable panel")));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:")));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Use default")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, _("Default"), "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team Color:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, _("Default"), "");
- e.addValue(e, _("Disable"), "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test the team color in HUD configure mode")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:")));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, _("Default"), "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
+ DIALOG_HUDPANEL_COMMON();
+
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Engine info:")));
me.TR(me);
float GameType_GetID(float cnt);
string GameType_GetName(float cnt);
float GameType_GetCount();
+
+#define DIALOG_HUDPANEL_COMMON() \
+ me.TR(me); \
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", hudpanel)), _("Enable panel"))); \
+ me.TR(me); \
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:"))); \
+ me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg")))); \
+ e.addValue(e, _("Default"), ""); \
+ e.addValue(e, _("Disable"), "0"); \
+ e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname))); \
+ e.configureXonoticTextSliderValues(e); \
+ me.TR(me); \
+ me.TDempty(me, 0.2); \
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:"))); \
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color")); \
+ setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), ""); \
+ me.TR(me); \
+ me.TDempty(me, 0.2); \
+ me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Use default"))); \
+ me.TR(me); \
+ me.TDempty(me, 0.2); \
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:"))); \
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border")))); \
+ e.addValue(e, _("Default"), ""); \
+ e.addValue(e, _("Disable"), "0"); \
+ for(i = 1; i <= 10; ++i) \
+ e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2))); \
+ e.configureXonoticTextSliderValues(e); \
+ me.TR(me); \
+ me.TDempty(me, 0.2); \
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:"))); \
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha")))); \
+ e.addValue(e, _("Default"), ""); \
+ for(i = 1; i <= 10; ++i) \
+ e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10))); \
+ e.configureXonoticTextSliderValues(e); \
+ me.TR(me); \
+ me.TDempty(me, 0.2); \
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team Color:"))); \
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team")))); \
+ e.addValue(e, _("Default"), ""); \
+ e.addValue(e, _("Disable"), "0"); \
+ for(i = 1; i <= 10; ++i) \
+ e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10))); \
+ e.configureXonoticTextSliderValues(e); \
+ me.TR(me); \
+ me.TDempty(me, 0.4); \
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test the team color in HUD configure mode"))); \
+ me.TR(me); \
+ me.TDempty(me, 0.2); \
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:"))); \
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding")))); \
+ e.addValue(e, _("Default"), ""); \
+ for(i = 0; i <= 10; ++i) \
+ e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5))); \
+ e.configureXonoticTextSliderValues(e)