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