]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c
Merge remote branch 'origin/terencehill/powerups_respawntime_fix'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_playersetup_model.c
1 #ifdef INTERFACE
2 CLASS(XonoticModelDialog) EXTENDS(XonoticDialog)
3         METHOD(XonoticModelDialog, toString, string(entity))
4         METHOD(XonoticModelDialog, fill, void(entity))
5         METHOD(XonoticModelDialog, showNotify, void(entity))
6         ATTRIB(XonoticModelDialog, title, string, _("Model settings"))
7         ATTRIB(XonoticModelDialog, color, vector, SKINCOLOR_DIALOG_MODEL)
8         ATTRIB(XonoticModelDialog, intendedWidth, float, 0.5)
9         ATTRIB(XonoticModelDialog, rows, float, 8)
10         ATTRIB(XonoticModelDialog, columns, float, 3)
11 ENDCLASS(XonoticModelDialog)
12 #endif
13
14 #ifdef IMPLEMENTATION
15 void XonoticModelDialog_showNotify(entity me)
16 {
17         loadAllCvars(me);
18 }
19 string XonoticModelDialog_toString(entity me)
20 {
21         return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
22 }
23 void XonoticModelDialog_fill(entity me)
24 {
25         entity e;
26         
27         me.TR(me);
28                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:")));
29                 me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow"));
30         me.TR(me);
31                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gibs:")));
32                 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs"));
33                         e.addValue(e, ZCTX(_("GIBS^None")), "1");
34                         e.addValue(e, ZCTX(_("GIBS^Few")), "0.75");
35                         e.addValue(e, ZCTX(_("GIBS^Many")), "0.5");
36                         e.addValue(e, ZCTX(_("GIBS^Lots")), "0");
37                         e.configureXonoticTextSliderValues(e);
38                         setDependent(e, "cl_gentle", 0, 0);
39         me.TR(me);
40                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Playermodel LOD:")));
41                 me.TD(me, 1, 2, e = makeXonoticSlider(0, 10, 1, "cl_playerdetailreduction"));
42         me.TR(me);
43         #ifdef ALLOW_FORCEMODELS
44                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force models:")));
45                 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, ZCTX(_("MDL^None"))));
46                 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, ZCTX(_("MDL^Custom"))));
47                 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, ZCTX(_("MDL^All"))));
48         #endif
49         me.TR(me);
50                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine")));
51         me.TR(me);
52                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayercolors", _("Force player colors to mine")));
53         me.TR(me);
54                 
55         me.gotoRC(me, me.rows - 1, 0);
56                 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
57                         e.onClick = Dialog_Close;
58                         e.onClickEntity = me;
59 }
60 #endif