X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_hudpanel_notification.c;h=1239bd316250fc3b340b20c81cca918999512563;hb=929918e8484be669ef5d46185ed947739a232685;hp=b0752664f2023258a2951bb0bf96b1399b79e755;hpb=5dc4bd363b8216f79266979e39a3cbb60a9ffe94;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_notification.c b/qcsrc/menu/xonotic/dialog_hudpanel_notification.c index b0752664f..1239bd316 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_notification.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_notification.c @@ -1,12 +1,13 @@ #ifdef INTERFACE CLASS(XonoticHUDNotificationDialog) EXTENDS(XonoticRootDialog) METHOD(XonoticHUDNotificationDialog, fill, void(entity)) - ATTRIB(XonoticHUDNotificationDialog, title, string, "Notification Panel") + 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, columns, float, 4) ATTRIB(XonoticHUDNotificationDialog, name, string, "HUDnotify") + ATTRIB(XonoticHUDNotificationDialog, requiresConnection, float, TRUE) ENDCLASS(XonoticHUDNotificationDialog) #endif @@ -15,77 +16,24 @@ void XonoticHUDNotificationDialog_fill(entity me) { entity e; string panelname = "notify"; - float i; + + DIALOG_HUDPANEL_COMMON(); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_notify", "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, "Notifications:")); + me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Notifications:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_notify_print", "Also print notifications to the console")); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_notify_print", _("Also print notifications to the console"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_notify_flip", "Flip notify order")); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_notify_flip", _("Flip notify order"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Entry lifetime:")); + me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Entry lifetime:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(3, 15, 1, "hud_panel_notify_time")); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Entry fadetime:")); + me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Entry fadetime:"))); me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 5, 0.5, "hud_panel_notify_fadetime")); } #endif