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