2 CLASS(XonoticInputSettingsTab) EXTENDS(XonoticTab)
3 METHOD(XonoticInputSettingsTab, fill, void(entity))
4 ATTRIB(XonoticInputSettingsTab, title, string, _("Input"))
5 ATTRIB(XonoticInputSettingsTab, intendedWidth, float, 0.9)
6 ATTRIB(XonoticInputSettingsTab, rows, float, 17)
7 ATTRIB(XonoticInputSettingsTab, columns, float, 6.2) // added extra .2 for center space
8 ENDCLASS(XonoticInputSettingsTab)
9 entity makeXonoticInputSettingsTab();
13 entity makeXonoticInputSettingsTab()
16 me = spawnXonoticInputSettingsTab();
17 me.configureDialog(me);
20 void XonoticInputSettingsTab_fill(entity me)
26 me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Key bindings:")));
28 me.TD(me, me.rows - 4, 3, kb = makeXonoticKeyBinder());
29 me.gotoRC(me, me.rows - 3, 0);
30 me.TD(me, 1, 1, e = makeXonoticButton(_("Change key..."), '0 0 0'));
31 e.onClick = KeyBinder_Bind_Change;
34 me.TD(me, 1, 1, e = makeXonoticButton(_("Edit..."), '0 0 0'));
35 e.onClick = KeyBinder_Bind_Edit;
37 kb.userbindEditButton = e;
38 kb.userbindEditDialog = main.userbindEditDialog;
39 main.userbindEditDialog.keybindBox = kb;
40 me.TD(me, 1, 1, e = makeXonoticButton(_("Clear"), '0 0 0'));
41 e.onClick = KeyBinder_Bind_Clear;
45 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
46 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it")));
48 me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_movement_track_canjump", _("Automatically repeat jumping if holding jump")));
51 if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE)
52 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", _("Use joystick input")));
53 else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE)
54 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", _("Use joystick input")));
57 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, string_null, _("Use joystick input")));
58 e.disabled = 1; // the option is never available in this case, just there for show
62 me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Mouse:")));
65 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Sensitivity:")));
66 me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity"));
69 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "m_filter", _("Smooth aiming")));
72 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1.022, "m_pitch", _("Invert aiming")));
75 if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE)
76 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "vid_dgamouse", _("Disable system mouse acceleration")));
77 else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE)
78 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Disable system mouse acceleration")));
81 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, string_null, _("Disable system mouse acceleration")));
82 e.disabled = 1; // the option is never available in this case, just there for show
86 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "m_accelerate", _("Enable built in mouse acceleration")));
89 me.gotoRC(me, me.rows - 1, 0);
90 me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_movement_track_canjump", COMMANDBUTTON_APPLY));