]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc
f37b766bd0ed2b4afef7aa136961ff608aa61fa2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_pressedkeys.qc
1 #include "dialog_hudpanel_pressedkeys.qh"
2 #ifndef DIALOG_HUDPANEL_PRESSEDKEYS_H
3 #define DIALOG_HUDPANEL_PRESSEDKEYS_H
4 #include "rootdialog.qc"
5 CLASS(XonoticHUDPressedKeysDialog, XonoticRootDialog)
6         METHOD(XonoticHUDPressedKeysDialog, fill, void(entity));
7         ATTRIB(XonoticHUDPressedKeysDialog, title, string, _("Pressed Keys Panel"))
8         ATTRIB(XonoticHUDPressedKeysDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
9         ATTRIB(XonoticHUDPressedKeysDialog, intendedWidth, float, 0.4)
10         ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15)
11         ATTRIB(XonoticHUDPressedKeysDialog, columns, float, 4)
12         ATTRIB(XonoticHUDPressedKeysDialog, name, string, "HUDpressedkeys")
13         ATTRIB(XonoticHUDPressedKeysDialog, requiresConnection, float, true)
14 ENDCLASS(XonoticHUDPressedKeysDialog)
15 #endif
16
17 #ifdef IMPLEMENTATION
18 void XonoticHUDPressedKeysDialog_fill(entity me)
19 {
20         entity e;
21         string panelname = "pressedkeys";
22
23         me.TR(me);
24                 me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_pressedkeys"));
25                         e.addValue(e, _("Panel disabled"), "0");
26                         e.addValue(e, _("Panel enabled when spectating"), "1");
27                         e.addValue(e, _("Panel always enabled"), "2");
28                         e.configureXonoticTextSliderValues(e);
29
30         DIALOG_HUDPANEL_COMMON_NOTOGGLE();
31
32         me.TR(me);
33                 me.TDempty(me, 0.2);
34                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Forced aspect:")));
35                         me.TD(me, 1, 2.6, e = makeXonoticSlider(0.2, 4, 0.1, "hud_panel_pressedkeys_aspect"));
36 }
37 #endif