]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_hudpanel_chat.qc
Merge branch 'master' into terencehill/menu_listbox_changes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_hudpanel_chat.qc
1 #ifndef DIALOG_HUDPANEL_CHAT_H
2 #define DIALOG_HUDPANEL_CHAT_H
3 #include "rootdialog.qc"
4 CLASS(XonoticHUDChatDialog, XonoticRootDialog)
5         METHOD(XonoticHUDChatDialog, fill, void(entity))
6         ATTRIB(XonoticHUDChatDialog, title, string, _("Chat Panel"))
7         ATTRIB(XonoticHUDChatDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
8         ATTRIB(XonoticHUDChatDialog, intendedWidth, float, 0.4)
9         ATTRIB(XonoticHUDChatDialog, rows, float, 15)
10         ATTRIB(XonoticHUDChatDialog, columns, float, 4)
11         ATTRIB(XonoticHUDChatDialog, name, string, "HUDchat")
12         ATTRIB(XonoticHUDChatDialog, requiresConnection, float, true)
13 ENDCLASS(XonoticHUDChatDialog)
14 #endif
15
16 #ifdef IMPLEMENTATION
17 void XonoticHUDChatDialog_fill(entity me)
18 {
19         entity e;
20         string panelname = "chat";
21
22         DIALOG_HUDPANEL_COMMON();
23
24         me.TR(me);
25                 me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Chat entries:")));
26         me.TR(me);
27                 me.TDempty(me, 0.2);
28                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Chat size:")));
29                 me.TD(me, 1, 2.6, e = makeXonoticSlider(6, 20, 1, "con_chatsize"));
30         me.TR(me);
31                 me.TDempty(me, 0.2);
32                 me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Chat lifetime:")));
33                 me.TD(me, 1, 2.6, e = makeXonoticSlider(5, 60, 5, "con_chattime"));
34         me.TR(me);
35                 me.TDempty(me, 0.2);
36                 me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "con_chatsound", _("Chat beep sound")));
37 }
38 #endif