X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_hudpanel_timer.c;h=2624a7ecd136a2419e80af1662dea5c52f9c8644;hp=5bacc4bc179fe7f6cbfc21604cd522eee387de1f;hb=71e6c75bc408ae5a116f296797c49c0cef7be113;hpb=3860a1ae7821a6f5ebf96a643d4514d12295285e diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_timer.c b/qcsrc/menu/xonotic/dialog_hudpanel_timer.c index 5bacc4bc1..2624a7ecd 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_timer.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_timer.c @@ -1,12 +1,13 @@ #ifdef INTERFACE CLASS(XonoticHUDTimerDialog) EXTENDS(XonoticRootDialog) METHOD(XonoticHUDTimerDialog, fill, void(entity)) - ATTRIB(XonoticHUDTimerDialog, title, string, "Timer Panel") + 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, columns, float, 4) ATTRIB(XonoticHUDTimerDialog, name, string, "HUDtimer") + ATTRIB(XonoticHUDTimerDialog, requiresConnection, float, TRUE) ENDCLASS(XonoticHUDTimerDialog) #endif @@ -15,61 +16,13 @@ void XonoticHUDTimerDialog_fill(entity me) { entity e; string panelname = "timer"; - float i; + + DIALOG_HUDPANEL_COMMON(); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_timer", "Enable panel")); - me.TR(me); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Background:")); - 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")))); - 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, "Timer:")); + me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Timer:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_timer_increment", "Show elapsed time")); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_timer_increment", _("Show elapsed time"))); } #endif