]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_settings_user_languagewarning.qc
Merge branch 'master' into terencehill/menu_listbox_changes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_user_languagewarning.qc
1 #ifndef DIALOG_SETTINGS_USER_LANGUAGEWARNING_H
2 #define DIALOG_SETTINGS_USER_LANGUAGEWARNING_H
3 #include "dialog.qc"
4 CLASS(XonoticLanguageWarningDialog, XonoticDialog)
5         METHOD(XonoticLanguageWarningDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls
6         ATTRIB(XonoticLanguageWarningDialog, title, string, _("Warning"))
7         ATTRIB(XonoticLanguageWarningDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM)
8         ATTRIB(XonoticLanguageWarningDialog, intendedWidth, float, 0.6)
9         ATTRIB(XonoticLanguageWarningDialog, rows, float, 5)
10         ATTRIB(XonoticLanguageWarningDialog, columns, float, 4)
11 ENDCLASS(XonoticLanguageWarningDialog)
12 #endif
13
14 #ifdef IMPLEMENTATION
15 void XonoticLanguageWarningDialog_fill(entity me)
16 {
17         entity e;
18         me.TR(me);
19                 me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("While connected language changes will be applied only to the menu,")));
20         me.TR(me);
21                 me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("full language changes will take effect starting from the next game")));
22         me.TR(me);
23         me.TR(me);
24                 // reconnect command doesn't work properly, otherwise it would replace disconnect
25                 me.TD(me, 1, 2, e = makeXonoticCommandButton(_("Disconnect now"), '0 0 0', "disconnect", 0));
26                 me.TD(me, 1, 2, e = makeXonoticCommandButton(_("Switch language"), '0 0 0', "prvm_language \"$_menu_prvm_language\"; menu_restart; menu_cmd languageselect", 0));
27 }
28 #endif