From: Rudolf Polzer Date: Sun, 16 Jan 2011 20:48:52 +0000 (+0100) Subject: some panelhud dialogs marked X-Git-Tag: xonotic-v0.5.0~318^2~99 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2e837ea6bc15d97984559627a698858b4b2893a8;p=xonotic%2Fxonotic-data.pk3dir.git some panelhud dialogs marked --- diff --git a/qcsrc/menu/stringfilelist.txt b/qcsrc/menu/stringfilelist.txt index 6016b1ba5..9d2803528 100644 --- a/qcsrc/menu/stringfilelist.txt +++ b/qcsrc/menu/stringfilelist.txt @@ -15,11 +15,6 @@ Guideline: List of files to do: -./xonotic/dialog.c -./xonotic/dialog_credits.c -./xonotic/dialog_hudpanel_ammo.c -./xonotic/dialog_hudpanel_chat.c -./xonotic/dialog_hudpanel_engineinfo.c ./xonotic/dialog_hudpanel_healtharmor.c ./xonotic/dialog_hudpanel_infomessages.c ./xonotic/dialog_hudpanel_modicons.c diff --git a/qcsrc/menu/xonotic/dialog_credits.c b/qcsrc/menu/xonotic/dialog_credits.c index 07c2fc4f2..e90ae4b42 100644 --- a/qcsrc/menu/xonotic/dialog_credits.c +++ b/qcsrc/menu/xonotic/dialog_credits.c @@ -2,7 +2,7 @@ CLASS(XonoticCreditsDialog) EXTENDS(XonoticDialog) METHOD(XonoticCreditsDialog, fill, void(entity)) METHOD(XonoticCreditsDialog, focusEnter, void(entity)) - ATTRIB(XonoticCreditsDialog, title, string, "Credits") + ATTRIB(XonoticCreditsDialog, title, string, _("Credits")) ATTRIB(XonoticCreditsDialog, color, vector, SKINCOLOR_DIALOG_CREDITS) ATTRIB(XonoticCreditsDialog, intendedWidth, float, SKINWIDTH_CREDITS) ATTRIB(XonoticCreditsDialog, rows, float, SKINROWS_CREDITS) @@ -18,7 +18,7 @@ void XonoticCreditsDialog_fill(entity me) me.TR(me); me.TD(me, me.rows - 1, me.columns, me.creditsList = makeXonoticCreditsList()); me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0')); + me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.c b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.c index 256dbe7df..efd282876 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.c @@ -1,7 +1,7 @@ #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) @@ -18,68 +18,68 @@ void XonoticHUDAmmoDialog_fill(entity me) float i; me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_ammo", "Enable panel")); + 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.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, _("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, 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.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, 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"); + 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, 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", ""); + 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, 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"); + 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.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, 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", ""); + 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, 2, 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, 2, 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, 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"))); } #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_chat.c b/qcsrc/menu/xonotic/dialog_hudpanel_chat.c index c9a4eae6e..6dcec3cde 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_chat.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_chat.c @@ -1,7 +1,7 @@ #ifdef INTERFACE CLASS(XonoticHUDChatDialog) EXTENDS(XonoticRootDialog) METHOD(XonoticHUDChatDialog, fill, void(entity)) - ATTRIB(XonoticHUDChatDialog, title, string, "Chat Panel") + ATTRIB(XonoticHUDChatDialog, title, string, _("Chat Panel")) ATTRIB(XonoticHUDChatDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) ATTRIB(XonoticHUDChatDialog, intendedWidth, float, 0.4) ATTRIB(XonoticHUDChatDialog, rows, float, 15) @@ -18,71 +18,71 @@ void XonoticHUDChatDialog_fill(entity me) float i; me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_chat", "Enable panel")); + 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.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, _("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, 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.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, 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"); + 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, 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", ""); + 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, 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"); + 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.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, 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", ""); + 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, "Chat entries:")); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Chat entries:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Chat size:")); + me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Chat size:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(6, 20, 1, "con_chatsize")); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Chat lifetime:")); + me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Chat lifetime:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(5, 60, 5, "con_chattime")); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_chatsound", "Chat beep sound")); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_chatsound", _("Chat beep sound"))); } #endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.c b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.c index 03ef106c7..9b1171a27 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.c @@ -1,7 +1,7 @@ #ifdef INTERFACE CLASS(XonoticHUDEngineInfoDialog) EXTENDS(XonoticRootDialog) METHOD(XonoticHUDEngineInfoDialog, fill, void(entity)) - ATTRIB(XonoticHUDEngineInfoDialog, title, string, "Engine Info Panel") + 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) @@ -18,63 +18,63 @@ void XonoticHUDEngineInfoDialog_fill(entity me) float i; me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo", "Enable panel")); + 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.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, _("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, 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.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, 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"); + 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, 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", ""); + 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, 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"); + 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.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, 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", ""); + 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, "Engine info:")); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Engine info:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo_framecounter_exponentialmovingaverage", "Use an averaging algorithm for fps")); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo_framecounter_exponentialmovingaverage", _("Use an averaging algorithm for fps"))); } #endif