X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_hudpanel_ammo.c;h=3c89d0a03ba08c63b1162fe79f422b65ac89a381;hb=2d826438b2ebd36c678772891253184fc7d483ff;hp=256dbe7df028ec0a93852b1dc0ae06123680a2df;hpb=ee1bc52fd8269edac22ce73ddecc88583fa1d623;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.c b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.c index 256dbe7df..3c89d0a03 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.c @@ -1,12 +1,13 @@ #ifdef INTERFACE CLASS(XonoticHUDAmmoDialog) EXTENDS(XonoticRootDialog) METHOD(XonoticHUDAmmoDialog, fill, void(entity)) - ATTRIB(XonoticHUDAmmoDialog, title, string, "Ammo Panel") + 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, columns, float, 4) ATTRIB(XonoticHUDAmmoDialog, name, string, "HUDammo") + ATTRIB(XonoticHUDAmmoDialog, requiresConnection, float, TRUE) ENDCLASS(XonoticHUDAmmoDialog) #endif @@ -15,71 +16,18 @@ void XonoticHUDAmmoDialog_fill(entity me) { entity e; string panelname = "ammo"; - float i; + + DIALOG_HUDPANEL_COMMON(); 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); - me.TR(me); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Ammunition display:")); + me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Ammunition display:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", "Show only current ammo type")); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", _("Show only current ammo type"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Align icon:")); - me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "0", "Left")); - me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "1", "Right")); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:"))); + me.TD(me, 1, 2.4/2, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "0", _("Left"))); + me.TD(me, 1, 2.4/2, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "1", _("Right"))); } #endif