X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_hudpanel_timer.qc;h=bea70827948dd77a830ced4b4965858780fa668d;hb=820e2ed127dd9923dde412e5b03a234ab98f52c8;hp=ae071e02e117e1b2d4ab93c5df287090ba1ccf48;hpb=86c9dc7c3696c329496b06375c1e79fb407401ce;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc index ae071e02e..bea708279 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc @@ -1,30 +1,29 @@ -#ifndef DIALOG_HUDPANEL_TIMER_H -#define DIALOG_HUDPANEL_TIMER_H -#include "rootdialog.qc" -CLASS(XonoticHUDTimerDialog, XonoticRootDialog) - METHOD(XonoticHUDTimerDialog, fill, void(entity)); - 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 +#include "dialog_hudpanel_timer.qh" + +#include "textslider.qh" +#include "checkbox.qh" +#include "textlabel.qh" -#ifdef IMPLEMENTATION void XonoticHUDTimerDialog_fill(entity me) { 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:"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_timer_increment", _("Show elapsed time"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Secondary timer:"))); + me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_timer_secondary")); + e.addValue(e, _("Disable"), "0"); + e.addValue(e, _("Enable"), "1"); + e.addValue(e, _("Swapped"), "2"); + e.configureXonoticTextSliderValues(e); } -#endif