Merge branch 'master' into Mario/vaporizer_damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_vote.qc
1 #ifndef DIALOG_HUDPANEL_VOTE_H
2 #define DIALOG_HUDPANEL_VOTE_H
3 #include "rootdialog.qc"
4 CLASS(XonoticHUDVoteDialog, XonoticRootDialog)
5         METHOD(XonoticHUDVoteDialog, fill, void(entity));
6         ATTRIB(XonoticHUDVoteDialog, title, string, _("Vote Panel"))
7         ATTRIB(XonoticHUDVoteDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
8         ATTRIB(XonoticHUDVoteDialog, intendedWidth, float, 0.4)
9         ATTRIB(XonoticHUDVoteDialog, rows, float, 15)
10         ATTRIB(XonoticHUDVoteDialog, columns, float, 4)
11         ATTRIB(XonoticHUDVoteDialog, name, string, "HUDvote")
12         ATTRIB(XonoticHUDVoteDialog, requiresConnection, float, true)
13 ENDCLASS(XonoticHUDVoteDialog)
14 #endif
15
16 #ifdef IMPLEMENTATION
17 void XonoticHUDVoteDialog_fill(entity me)
18 {
19         entity e;
20         string panelname = "vote";
21
22         DIALOG_HUDPANEL_COMMON();
23
24         me.TR(me);
25                 me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Alpha after voting:")));
26                 me.TD(me, 1, 2.6, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_vote_alreadyvoted_alpha"));
27 }
28 #endif