Xonotic
dialog_hudpanel_weapons.qc File Reference
#include "dialog_hudpanel_weapons.qh"
#include "checkbox.qh"
#include "textlabel.qh"
#include "textslider.qh"
#include "slider.qh"
#include "radiobutton.qh"
#include "colorpicker_string.qh"
+ Include dependency graph for dialog_hudpanel_weapons.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void XonoticHUDWeaponsDialog_fill (entity me)
 

Function Documentation

◆ XonoticHUDWeaponsDialog_fill()

void XonoticHUDWeaponsDialog_fill ( entity  me)

Definition at line 10 of file dialog_hudpanel_weapons.qc.

References dialog_hudpanel_main_checkbox(), dialog_hudpanel_main_settings(), entity(), and makeXonoticTextLabel().

11 {
12  entity e;
13  string panelname = "weapons";
14  float i;
15 
16  dialog_hudpanel_main_checkbox(me, panelname);
17 
18  dialog_hudpanel_main_settings(me, panelname);
19 
20  me.TR(me);
21  me.TDempty(me, 0.2);
22  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Fade out after:")));
23  me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_timeout"))));
24  e.addValue(e, _("Never"), "0");
25  for(i = 1; i <= 10; ++i)
26  e.addValue(e, strzone(sprintf(_("%ds"), i)), strzone(ftos(i)));
27  e.configureXonoticTextSliderValues(e);
28  me.TR(me);
29  me.TDempty(me, 0.2);
30  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Fade effect:")));
31  setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
32  me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_timeout_effect"))));
33  e.addValue(e, ZCTX(_("EF^None")), "0");
34  e.addValue(e, _("Alpha"), "1");
35  e.addValue(e, _("Slide"), "2");
36  e.addValue(e, ZCTX(_("EF^Both")), "3");
37  e.configureXonoticTextSliderValues(e);
38  setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
39  me.TR(me);
40  me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Weapon icons:")));
41  me.TR(me);
42  me.TDempty(me, 0.2);
43  me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_weapons_onlyowned", _("Show only owned weapons")));
44  me.TR(me);
45  me.TDempty(me, 0.2);
46  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent alpha:")));
47  me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_weapons_noncurrent_alpha"));
48  me.TR(me);
49  me.TDempty(me, 0.2);
50  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Noncurrent scale:")));
51  me.TD(me, 1, 2.6, e = makeXonoticSlider(0, 1, 0.1, "hud_panel_weapons_noncurrent_scale"));
52  me.TR(me);
53  me.TDempty(me, 0.2);
54  me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Show weapon ID as:")));
55  me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "0", ZCTX(_("SHOWAS^None"))));
56  me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "1", _("Number")));
57  me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "2", _("Bind")));
58  me.TR(me);
59  me.TDempty(me, 0.2);
60  me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Weapon ID scale:")));
61  setDependent(e, "hud_panel_weapons_label", 1, 2);
62  me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.05, "hud_panel_weapons_label_scale"));
63  setDependent(e, "hud_panel_weapons_label", 1, 2);
64  me.TR(me);
65  me.TDempty(me, 0.2);
66  me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_weapons_accuracy", _("Show Accuracy")));
67  me.TD(me, 1, 3.8/2, e = makeXonoticCheckBox(0, "hud_panel_weapons_ammo", _("Show Ammo")));
68  me.TR(me);
69  me.TDempty(me, 0.2);
70  me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Ammo bar alpha:")));
71  setDependent(e, "hud_panel_weapons_ammo", 1, 1);
72  me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_weapons_ammo_alpha"));
73  setDependent(e, "hud_panel_weapons_ammo", 1, 1);
74  me.TR(me);
75  me.TDempty(me, 0.2);
76  me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Ammo bar color:")));
77  setDependent(e, "hud_panel_weapons_ammo", 1, 1);
78  me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
79  setDependent(e, "hud_panel_weapons_ammo", 1, 1);
80  me.TR(me);
81 }
entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText)
Definition: radiobutton.qc:10
entity() spawn
entity makeXonoticTextLabel(float theAlign, string theText)
Definition: textlabel.qc:3
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition: slider.qc:10
#define ZCTX(s)
Definition: i18n.qh:68
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar)
entity makeXonoticTextSlider(string theCvar)
Definition: textslider.qc:10
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition: checkbox.qc:28
+ Here is the call graph for this function: