Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
dialog_hudpanel_ammo.qc File Reference
#include "dialog_hudpanel_ammo.qh"
#include "slider.qh"
#include "checkbox.qh"
#include "textlabel.qh"
#include "radiobutton.qh"
Include dependency graph for dialog_hudpanel_ammo.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void XonoticHUDAmmoDialog_fill (entity me)

Function Documentation

◆ XonoticHUDAmmoDialog_fill()

void XonoticHUDAmmoDialog_fill ( entity me)

Definition at line 8 of file dialog_hudpanel_ammo.qc.

9{
10 entity e;
11 string panelname = "ammo";
12
13 dialog_hudpanel_main_checkbox(me, panelname);
14
15 dialog_hudpanel_main_settings(me, panelname);
16
17 me.TR(me);
18 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", _("Show only current ammo type")));
19 me.TR(me);
20 me.TDempty(me, 0.2);
21 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Noncurrent opacity:")));
22 setDependent(e, "hud_panel_ammo_onlycurrent", 0, 0);
23 me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_ammo_noncurrent_alpha"));
24 e.formatString = "%";
25 setDependent(e, "hud_panel_ammo_onlycurrent", 0, 0);
26 me.TR(me);
27 me.TDempty(me, 0.2);
28 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Noncurrent scale:")));
29 setDependentNOT(e, "hud_panel_ammo_noncurrent_alpha", 0);
30 setDependentAND(e, "hud_panel_ammo_onlycurrent", 0, 0);
31 me.TD(me, 1, 2.4, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_ammo_noncurrent_scale"));
32 e.formatString = "%";
33 setDependentNOT(e, "hud_panel_ammo_noncurrent_alpha", 0);
34 setDependentAND(e, "hud_panel_ammo_onlycurrent", 0, 0);
35
36 me.TR(me);
37 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:")));
38 me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "0", _("Left")));
39 me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "1", _("Right")));
40
41 me.TR(me);
42 me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_ammo_progressbar", _("Enable status bar")));
43}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void setDependentAND(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition util.qc:213
void dialog_hudpanel_main_checkbox(entity me, string panelname)
Definition util.qc:722
void setDependentNOT(entity e, string theCvarName, float theCvarValue)
Definition util.qc:192
void dialog_hudpanel_main_settings(entity me, string panelname)
Definition util.qc:731
void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition util.qc:180
entity makeXonoticTextLabel(float theAlign, string theText)
Definition textlabel.qc:3
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition checkbox.qc:28
entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText)
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition slider.qc:10

References dialog_hudpanel_main_checkbox(), dialog_hudpanel_main_settings(), entity(), makeXonoticCheckBox(), makeXonoticRadioButton(), makeXonoticSlider(), makeXonoticTextLabel(), setDependent(), setDependentAND(), and setDependentNOT().