From: terencehill Date: Tue, 26 May 2015 10:39:25 +0000 (+0200) Subject: dialog_hudpanel_itemstime.c --> dialog_hudpanel_itemstime.qc X-Git-Tag: xonotic-v0.8.1~12^2~23 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=59a682da8154cb8ccab3d8556862e4a63eb6d3a5;p=xonotic%2Fxonotic-data.pk3dir.git dialog_hudpanel_itemstime.c --> dialog_hudpanel_itemstime.qc --- diff --git a/qcsrc/menu/classes.inc b/qcsrc/menu/classes.inc index 0e6bb8593..0c2e665d9 100644 --- a/qcsrc/menu/classes.inc +++ b/qcsrc/menu/classes.inc @@ -47,7 +47,7 @@ #include "xonotic/dialog_hudpanel_engineinfo.qc" #include "xonotic/dialog_hudpanel_healtharmor.qc" #include "xonotic/dialog_hudpanel_infomessages.qc" -#include "xonotic/dialog_hudpanel_itemstime.c" +#include "xonotic/dialog_hudpanel_itemstime.qc" #include "xonotic/dialog_hudpanel_modicons.qc" #include "xonotic/dialog_hudpanel_notification.qc" #include "xonotic/dialog_hudpanel_physics.qc" diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.c b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.c deleted file mode 100644 index a6436179b..000000000 --- a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.c +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef DIALOG_HUDPANEL_ITEMSTIME_H -#define DIALOG_HUDPANEL_ITEMSTIME_H -#include "rootdialog.qc" -CLASS(XonoticHUDItemsTimeDialog, XonoticRootDialog) - METHOD(XonoticHUDItemsTimeDialog, fill, void(entity)) - ATTRIB(XonoticHUDItemsTimeDialog, title, string, _("Items Time Panel")) - ATTRIB(XonoticHUDItemsTimeDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) - ATTRIB(XonoticHUDItemsTimeDialog, intendedWidth, float, 0.4) - ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 15) - ATTRIB(XonoticHUDItemsTimeDialog, columns, float, 4) - ATTRIB(XonoticHUDItemsTimeDialog, name, string, "HUDitemstime") -ENDCLASS(XonoticHUDItemsTimeDialog) -#endif - -#ifdef IMPLEMENTATION -void XonoticHUDItemsTimeDialog_fill(entity me) -{ - entity e; - string panelname = "itemstime"; - - me.TR(me); - me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_itemstime")); - e.addValue(e, ZCTX(_("PNL^Disabled")), "0"); - e.addValue(e, ZCTX(_("PNL^Enabled spectating")), "1"); - e.addValue(e, ZCTX(_("PNL^Enabled even playing in warmup")), "2"); - e.configureXonoticTextSliderValues(e); - - DIALOG_HUDPANEL_COMMON_NOTOGGLE(); - - me.TR(me); - me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:"))); - me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "0", _("Left"))); - me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "1", _("Right"))); - me.TR(me); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar", _("Enable status bar"))); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar_reduced", _("Reduced"))); - setDependent(e, "hud_panel_itemstime_progressbar", 1, 1); - me.TR(me); - me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Text/icon ratio:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(2, 8, 0.5, "hud_panel_itemstime_ratio")); - me.TR(me); - me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_showspawned", _("Show spawned items"))); - me.TR(me); - me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_size_dinamic", _("Dinamic size"))); -} -#endif diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc new file mode 100644 index 000000000..a6436179b --- /dev/null +++ b/qcsrc/menu/xonotic/dialog_hudpanel_itemstime.qc @@ -0,0 +1,46 @@ +#ifndef DIALOG_HUDPANEL_ITEMSTIME_H +#define DIALOG_HUDPANEL_ITEMSTIME_H +#include "rootdialog.qc" +CLASS(XonoticHUDItemsTimeDialog, XonoticRootDialog) + METHOD(XonoticHUDItemsTimeDialog, fill, void(entity)) + ATTRIB(XonoticHUDItemsTimeDialog, title, string, _("Items Time Panel")) + ATTRIB(XonoticHUDItemsTimeDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) + ATTRIB(XonoticHUDItemsTimeDialog, intendedWidth, float, 0.4) + ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 15) + ATTRIB(XonoticHUDItemsTimeDialog, columns, float, 4) + ATTRIB(XonoticHUDItemsTimeDialog, name, string, "HUDitemstime") +ENDCLASS(XonoticHUDItemsTimeDialog) +#endif + +#ifdef IMPLEMENTATION +void XonoticHUDItemsTimeDialog_fill(entity me) +{ + entity e; + string panelname = "itemstime"; + + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_itemstime")); + e.addValue(e, ZCTX(_("PNL^Disabled")), "0"); + e.addValue(e, ZCTX(_("PNL^Enabled spectating")), "1"); + e.addValue(e, ZCTX(_("PNL^Enabled even playing in warmup")), "2"); + e.configureXonoticTextSliderValues(e); + + DIALOG_HUDPANEL_COMMON_NOTOGGLE(); + + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:"))); + me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "0", _("Left"))); + me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "1", _("Right"))); + me.TR(me); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar", _("Enable status bar"))); + me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar_reduced", _("Reduced"))); + setDependent(e, "hud_panel_itemstime_progressbar", 1, 1); + me.TR(me); + me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Text/icon ratio:"))); + me.TD(me, 1, 2.6, e = makeXonoticSlider(2, 8, 0.5, "hud_panel_itemstime_ratio")); + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_showspawned", _("Show spawned items"))); + me.TR(me); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_size_dinamic", _("Dinamic size"))); +} +#endif