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.5)
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 - 2, 3.3, kb = makeXonoticKeyBinder());
29 me.gotoRC(me, me.rows - 1, 0);
31 me.TD(me, 1, 1.1, e = makeXonoticButton(_("Change key..."), '0 0 0'));
32 e.onClick = KeyBinder_Bind_Change;
35 me.TD(me, 1, 1.1, e = makeXonoticButton(_("Edit..."), '0 0 0'));
36 e.onClick = KeyBinder_Bind_Edit;
38 kb.userbindEditButton = e;
39 kb.userbindEditDialog = main.userbindEditDialog;
40 main.userbindEditDialog.keybindBox = kb;
41 me.TD(me, 1, 1.1, e = makeXonoticButton(_("Clear"), '0 0 0'));
42 e.onClick = KeyBinder_Bind_Clear;
45 me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
46 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Sensitivity:")));
47 me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity"));
49 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("UI mouse speed:")));
50 me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 4.0, 0.1, "menu_mouse_speed"));
52 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_filter", _("Mouse filter")));
54 me.TD(me, 1, 3, e = makeXonoticCheckBox(1.022, "m_pitch", _("Invert mouse")));
56 if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE)
57 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", _("Use joystick input")));
58 else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE)
59 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", _("Use joystick input")));
61 if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE)
62 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_dgamouse", _("Turn off OS mouse acceleration")));
63 else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE)
64 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Turn off OS mouse acceleration")));
66 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("\"enter console\" also closes")));