entity e;
string panelname = "ammo";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Ammunition display:")));
ATTRIB(XonoticHUDAmmoDialog, title, string, _("Ammo Panel"));
ATTRIB(XonoticHUDAmmoDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDAmmoDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDAmmoDialog, rows, float, 15);
+ ATTRIB(XonoticHUDAmmoDialog, rows, float, 15.5);
ATTRIB(XonoticHUDAmmoDialog, columns, float, 4);
ATTRIB(XonoticHUDAmmoDialog, name, string, "HUDammo");
ATTRIB(XonoticHUDAmmoDialog, requiresConnection, float, true);
entity e;
string panelname = "centerprint";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TDempty(me, 0.2);
ATTRIB(XonoticHUDCenterprintDialog, title, string, _("Centerprint Panel"));
ATTRIB(XonoticHUDCenterprintDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDCenterprintDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDCenterprintDialog, rows, float, 15);
+ ATTRIB(XonoticHUDCenterprintDialog, rows, float, 15.5);
ATTRIB(XonoticHUDCenterprintDialog, columns, float, 4);
ATTRIB(XonoticHUDCenterprintDialog, name, string, "HUDcenterprint");
ATTRIB(XonoticHUDCenterprintDialog, requiresConnection, float, true);
entity e;
string panelname = "chat";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Chat entries:")));
ATTRIB(XonoticHUDChatDialog, title, string, _("Chat Panel"));
ATTRIB(XonoticHUDChatDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDChatDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDChatDialog, rows, float, 15);
+ ATTRIB(XonoticHUDChatDialog, rows, float, 15.5);
ATTRIB(XonoticHUDChatDialog, columns, float, 4);
ATTRIB(XonoticHUDChatDialog, name, string, "HUDchat");
ATTRIB(XonoticHUDChatDialog, requiresConnection, float, true);
entity e;
string panelname = "engineinfo";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Engine info:")));
ATTRIB(XonoticHUDEngineInfoDialog, title, string, _("Engine Info Panel"));
ATTRIB(XonoticHUDEngineInfoDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDEngineInfoDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15);
+ ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15.5);
ATTRIB(XonoticHUDEngineInfoDialog, columns, float, 4);
ATTRIB(XonoticHUDEngineInfoDialog, name, string, "HUDengineinfo");
ATTRIB(XonoticHUDEngineInfoDialog, requiresConnection, float, true);
entity e;
string panelname = "healtharmor";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_combined", _("Combine health and armor")));
ATTRIB(XonoticHUDHealthArmorDialog, title, string, _("Health/Armor Panel"));
ATTRIB(XonoticHUDHealthArmorDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDHealthArmorDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 16);
+ ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 16.5);
ATTRIB(XonoticHUDHealthArmorDialog, columns, float, 4);
ATTRIB(XonoticHUDHealthArmorDialog, name, string, "HUDhealtharmor");
ATTRIB(XonoticHUDHealthArmorDialog, requiresConnection, float, true);
entity e;
string panelname = "infomessages";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Info messages:")));
ATTRIB(XonoticHUDInfoMessagesDialog, title, string, _("Info Messages Panel"));
ATTRIB(XonoticHUDInfoMessagesDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDInfoMessagesDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDInfoMessagesDialog, rows, float, 15);
+ ATTRIB(XonoticHUDInfoMessagesDialog, rows, float, 15.5);
ATTRIB(XonoticHUDInfoMessagesDialog, columns, float, 4);
ATTRIB(XonoticHUDInfoMessagesDialog, name, string, "HUDinfomessages");
ATTRIB(XonoticHUDInfoMessagesDialog, requiresConnection, float, true);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_itemstime"));
- e.addValue(e, ZCTX(_("PNL^Disabled")), "0");
- e.addValue(e, ZCTX(_("PNL^Enabled spectating")), "1");
- e.addValue(e, ZCTX(_("PNL^Enabled even playing in warmup")), "2");
+ e.addValue(e, _("Disable"), "0");
+ e.addValue(e, _("Enable spectating"), "1");
+ e.addValue(e, _("Enable even playing in warmup"), "2");
e.configureXonoticTextSliderValues(e);
- DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:")));
ATTRIB(XonoticHUDItemsTimeDialog, title, string, _("Items Time Panel"));
ATTRIB(XonoticHUDItemsTimeDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDItemsTimeDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 15);
+ ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 15.5);
ATTRIB(XonoticHUDItemsTimeDialog, columns, float, 4);
ATTRIB(XonoticHUDItemsTimeDialog, name, string, "HUDitemstime");
ENDCLASS(XonoticHUDItemsTimeDialog)
entity e;
string panelname = "modicons";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
}
ATTRIB(XonoticHUDModIconsDialog, title, string, _("Mod Icons Panel"));
ATTRIB(XonoticHUDModIconsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDModIconsDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDModIconsDialog, rows, float, 15);
+ ATTRIB(XonoticHUDModIconsDialog, rows, float, 15.5);
ATTRIB(XonoticHUDModIconsDialog, columns, float, 4);
ATTRIB(XonoticHUDModIconsDialog, name, string, "HUDmodicons");
ATTRIB(XonoticHUDModIconsDialog, requiresConnection, float, true);
entity e;
string panelname = "notify";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Notifications:")));
ATTRIB(XonoticHUDNotificationDialog, title, string, _("Notification Panel"));
ATTRIB(XonoticHUDNotificationDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDNotificationDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDNotificationDialog, rows, float, 15);
+ ATTRIB(XonoticHUDNotificationDialog, rows, float, 15.5);
ATTRIB(XonoticHUDNotificationDialog, columns, float, 4);
ATTRIB(XonoticHUDNotificationDialog, name, string, "HUDnotify");
ATTRIB(XonoticHUDNotificationDialog, requiresConnection, float, true);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_physics"));
- e.addValue(e, _("Panel disabled"), "0");
- e.addValue(e, _("Panel enabled"), "1");
- e.addValue(e, _("Panel enabled even observing"), "2");
- e.addValue(e, _("Panel enabled only in Race/CTS"), "3");
+ e.addValue(e, _("Disable"), "0");
+ e.addValue(e, _("Enable"), "1");
+ e.addValue(e, _("Enable even observing"), "2");
+ e.addValue(e, _("Enable only in Race/CTS"), "3");
e.configureXonoticTextSliderValues(e);
- DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 1.4, e = makeXonoticCheckBox(0, "hud_panel_physics_progressbar", _("Status bar")));
ATTRIB(XonoticHUDPhysicsDialog, title, string, _("Physics Panel"));
ATTRIB(XonoticHUDPhysicsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDPhysicsDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDPhysicsDialog, rows, float, 15);
+ ATTRIB(XonoticHUDPhysicsDialog, rows, float, 15.5);
ATTRIB(XonoticHUDPhysicsDialog, columns, float, 4);
ATTRIB(XonoticHUDPhysicsDialog, name, string, "HUDphysics");
ATTRIB(XonoticHUDPhysicsDialog, sliderTopspeedTime, entity);
entity e;
string panelname = "powerups";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_powerups_progressbar", _("Enable status bar")));
ATTRIB(XonoticHUDPowerupsDialog, title, string, _("Powerups Panel"));
ATTRIB(XonoticHUDPowerupsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDPowerupsDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDPowerupsDialog, rows, float, 14);
+ ATTRIB(XonoticHUDPowerupsDialog, rows, float, 15.5);
ATTRIB(XonoticHUDPowerupsDialog, columns, float, 4);
ATTRIB(XonoticHUDPowerupsDialog, name, string, "HUDpowerups");
ATTRIB(XonoticHUDPowerupsDialog, requiresConnection, float, true);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_pressedkeys"));
- e.addValue(e, _("Panel disabled"), "0");
- e.addValue(e, _("Panel enabled when spectating"), "1");
- e.addValue(e, _("Panel always enabled"), "2");
+ e.addValue(e, ("Disable"), "0");
+ e.addValue(e, ("Enable when spectating"), "1");
+ e.addValue(e, ("Always enable"), "2");
e.configureXonoticTextSliderValues(e);
- DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TDempty(me, 0.2);
ATTRIB(XonoticHUDPressedKeysDialog, title, string, _("Pressed Keys Panel"));
ATTRIB(XonoticHUDPressedKeysDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDPressedKeysDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15);
+ ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15.5);
ATTRIB(XonoticHUDPressedKeysDialog, columns, float, 4);
ATTRIB(XonoticHUDPressedKeysDialog, name, string, "HUDpressedkeys");
ATTRIB(XonoticHUDPressedKeysDialog, requiresConnection, float, true);
entity e;
string panelname = "quickmenu";
- DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+ // this panel has no main cvar
+ //dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Text alignment:")));
ATTRIB(XonoticHUDQuickMenuDialog, title, string, _("Quick Menu Panel"));
ATTRIB(XonoticHUDQuickMenuDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDQuickMenuDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDQuickMenuDialog, rows, float, 15);
+ ATTRIB(XonoticHUDQuickMenuDialog, rows, float, 15.5);
ATTRIB(XonoticHUDQuickMenuDialog, columns, float, 4);
ATTRIB(XonoticHUDQuickMenuDialog, name, string, "HUDquickmenu");
ENDCLASS(XonoticHUDQuickMenuDialog)
entity e;
string panelname = "racetimer";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
}
ATTRIB(XonoticHUDRaceTimerDialog, title, string, _("Race Timer Panel"));
ATTRIB(XonoticHUDRaceTimerDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDRaceTimerDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDRaceTimerDialog, rows, float, 15);
+ ATTRIB(XonoticHUDRaceTimerDialog, rows, float, 15.5);
ATTRIB(XonoticHUDRaceTimerDialog, columns, float, 4);
ATTRIB(XonoticHUDRaceTimerDialog, name, string, "HUDracetimer");
ATTRIB(XonoticHUDRaceTimerDialog, requiresConnection, float, true);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_radar"));
- e.addValue(e, _("Panel disabled"), "0");
- e.addValue(e, _("Panel enabled in teamgames"), "1");
- e.addValue(e, _("Panel always enabled"), "2");
+ e.addValue(e, _("Disable"), "0");
+ e.addValue(e, _("Enable in team games"), "1");
+ e.addValue(e, _("Always enable"), "2");
e.configureXonoticTextSliderValues(e);
- DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Radar:")));
ATTRIB(XonoticHUDRadarDialog, title, string, _("Radar Panel"));
ATTRIB(XonoticHUDRadarDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDRadarDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDRadarDialog, rows, float, 15);
+ ATTRIB(XonoticHUDRadarDialog, rows, float, 15.5);
ATTRIB(XonoticHUDRadarDialog, columns, float, 4);
ATTRIB(XonoticHUDRadarDialog, name, string, "HUDradar");
ATTRIB(XonoticHUDRadarDialog, requiresConnection, float, true);
entity e;
string panelname = "score";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Score:")));
ATTRIB(XonoticHUDScoreDialog, title, string, _("Score Panel"));
ATTRIB(XonoticHUDScoreDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDScoreDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDScoreDialog, rows, float, 15);
+ ATTRIB(XonoticHUDScoreDialog, rows, float, 15.5);
ATTRIB(XonoticHUDScoreDialog, columns, float, 4);
ATTRIB(XonoticHUDScoreDialog, name, string, "HUDscore");
ATTRIB(XonoticHUDScoreDialog, requiresConnection, float, true);
entity e;
string panelname = "timer";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Timer:")));
ATTRIB(XonoticHUDTimerDialog, title, string, _("Timer Panel"));
ATTRIB(XonoticHUDTimerDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDTimerDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDTimerDialog, rows, float, 15);
+ ATTRIB(XonoticHUDTimerDialog, rows, float, 15.5);
ATTRIB(XonoticHUDTimerDialog, columns, float, 4);
ATTRIB(XonoticHUDTimerDialog, name, string, "HUDtimer");
ATTRIB(XonoticHUDTimerDialog, requiresConnection, float, true);
entity e;
string panelname = "vote";
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Alpha after voting:")));
ATTRIB(XonoticHUDVoteDialog, title, string, _("Vote Panel"));
ATTRIB(XonoticHUDVoteDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDVoteDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDVoteDialog, rows, float, 15);
+ ATTRIB(XonoticHUDVoteDialog, rows, float, 15.5);
ATTRIB(XonoticHUDVoteDialog, columns, float, 4);
ATTRIB(XonoticHUDVoteDialog, name, string, "HUDvote");
ATTRIB(XonoticHUDVoteDialog, requiresConnection, float, true);
string panelname = "weapons";
float i;
- DIALOG_HUDPANEL_COMMON();
+ dialog_hudpanel_main_checkbox(me, panelname);
+
+ dialog_hudpanel_main_settings(me, panelname);
me.TR(me);
me.TDempty(me, 0.2);
ATTRIB(XonoticHUDWeaponsDialog, title, string, _("Weapons Panel"));
ATTRIB(XonoticHUDWeaponsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT);
ATTRIB(XonoticHUDWeaponsDialog, intendedWidth, float, 0.4);
- ATTRIB(XonoticHUDWeaponsDialog, rows, float, 21);
+ ATTRIB(XonoticHUDWeaponsDialog, rows, float, 21.5);
ATTRIB(XonoticHUDWeaponsDialog, columns, float, 4);
ATTRIB(XonoticHUDWeaponsDialog, name, string, "HUDweapons");
ATTRIB(XonoticHUDWeaponsDialog, requiresConnection, float, true);
entity makeXonoticCheckBox(float, string, string);
.bool sendCvars;
-void dialog_hudpanel_common_notoggle(entity me, string panelname)
+void dialog_hudpanel_main_checkbox(entity me, string panelname)
{
- float i;
entity e;
me.TR(me);
+ me.TDempty(me, 1.5);
+ me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable")));
+}
+
+void dialog_hudpanel_main_settings(entity me, string panelname)
+{
+ float i;
+ entity e;
+
+ me.gotoRC(me, me.currentRow + 1.5, 0);
me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
e.addValue(e, _("Default"), "");
int GameType_GetCount();
int GameType_GetTotalCount();
-void dialog_hudpanel_common_notoggle(entity me, string panelname);
-#define DIALOG_HUDPANEL_COMMON_NOTOGGLE() \
- dialog_hudpanel_common_notoggle(me, panelname)
-#define DIALOG_HUDPANEL_COMMON() \
- me.TR(me); \
- me.TD(me, 1, 4, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable panel"))); \
- DIALOG_HUDPANEL_COMMON_NOTOGGLE()
+void dialog_hudpanel_main_checkbox(entity me, string panelname);
+void dialog_hudpanel_main_settings(entity me, string panelname);
float getFadedAlpha(float currentAlpha, float startAlpha, float targetAlpha);