]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_settings_input.qc
take3: format 903 files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_settings_input.qc
index 7f3af39f878be318dad0a2210eb7291c08b13e39..ed0eaa5f106de3065991bd8529cb180221c2e033 100644 (file)
@@ -22,7 +22,7 @@ void CheckBox_Click_Redisplay(entity me, entity checkbox)
 {
        CheckBox_Click(me, checkbox);
        cmd("\ndefer 0.2 \"togglemenu 1\"\n");
-       //m_display();
+       // m_display();
 }
 void XonoticInputSettingsTab_fill(entity me)
 {
@@ -30,93 +30,86 @@ void XonoticInputSettingsTab_fill(entity me)
        entity kb = makeXonoticKeyBinder();
 
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Key Bindings")));
+       me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Key Bindings")));
        me.TR(me);
-               me.TD(me, me.rows - 3, 3, kb);
+       me.TD(me, me.rows - 3, 3, kb);
        me.gotoRC(me, me.rows - 2, 0);
-               me.TD(me, 1, 1, e = makeXonoticButton(_("Change key..."), '0 0 0'));
-                       e.onClick = KeyBinder_Bind_Change;
-                       e.onClickEntity = kb;
-                       kb.keyGrabButton = e;
-               me.TD(me, 1, 1, e = makeXonoticButton(_("Edit..."), '0 0 0'));
-                       e.onClick = KeyBinder_Bind_Edit;
-                       e.onClickEntity = kb;
-                       kb.userbindEditButton = e;
-                       kb.userbindEditDialog = main.userbindEditDialog;
-                       main.userbindEditDialog.keybindBox = kb;
-               me.TD(me, 1, 1, e = makeXonoticButton(_("Clear"), '0 0 0'));
-                       e.onClick = KeyBinder_Bind_Clear;
-                       e.onClickEntity = kb;
-                       kb.clearButton = e;
+       me.TD(me, 1, 1, e = makeXonoticButton(_("Change key..."), '0 0 0'));
+       e.onClick = KeyBinder_Bind_Change;
+       e.onClickEntity = kb;
+       kb.keyGrabButton = e;
+       me.TD(me, 1, 1, e = makeXonoticButton(_("Edit..."), '0 0 0'));
+       e.onClick = KeyBinder_Bind_Edit;
+       e.onClickEntity = kb;
+       kb.userbindEditButton = e;
+       kb.userbindEditDialog = main.userbindEditDialog;
+       main.userbindEditDialog.keybindBox = kb;
+       me.TD(me, 1, 1, e = makeXonoticButton(_("Clear"), '0 0 0'));
+       e.onClick = KeyBinder_Bind_Clear;
+       e.onClickEntity = kb;
+       kb.clearButton = e;
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticButton(_("Reset all"), '0 0 0'));
-                       e.onClick = KeyBinder_Bind_Reset_All;
-                       e.onClickEntity = kb;
+       me.TD(me, 1, 3, e = makeXonoticButton(_("Reset all"), '0 0 0'));
+       e.onClick = KeyBinder_Bind_Reset_All;
+       e.onClickEntity = kb;
 
-       me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
-               me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Mouse")));
+       me.gotoRC(me, 0, 3.2);
+       me.setFirstColumn(me, me.currentColumn);
+       me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Mouse")));
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Sensitivity:")));
-               me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 32, 0.2, "sensitivity",
+       me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Sensitivity:")));
+       me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 32, 0.2, "sensitivity",
                        _("Mouse speed multiplier")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "m_filter", _("Smooth aiming"),
+       me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "m_filter", _("Smooth aiming"),
                        _("Smoothes the mouse movement, but makes aiming slightly less responsive")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(1.022, "m_pitch", _("Invert aiming"),
+       me.TD(me, 1, 3, e = makeXonoticCheckBox_T(1.022, "m_pitch", _("Invert aiming"),
                        _("Invert mouse movement on the Y-axis")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "menu_mouse_absolute", _("Use system mouse positioning"), "-"));
-                       makeMulti(e, "hud_cursormode");
-                       e.onClick = CheckBox_Click_Redisplay;
-                       e.onClickEntity = e;
+       me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "menu_mouse_absolute", _("Use system mouse positioning"), "-"));
+       makeMulti(e, "hud_cursormode");
+       e.onClick = CheckBox_Click_Redisplay;
+       e.onClickEntity = e;
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_accelerate", _("Enable built in mouse acceleration")));
+       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_accelerate", _("Enable built in mouse acceleration")));
        me.TR(me);
-               if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE)
-               {
-                       me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "vid_dgamouse", _("Disable system mouse acceleration"),
+       if (cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE) {
+               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "vid_dgamouse", _("Disable system mouse acceleration"),
                                _("Make use of DGA mouse input")));
-               }
-               else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE)
-                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Disable system mouse acceleration")));
-               else
-               {
-                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, string_null, _("Disable system mouse acceleration")));
-                       e.disabled = 1; // the option is never available in this case, just there for show
-               }
+       } else if (cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE) {
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Disable system mouse acceleration")));
+       } else {
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, string_null, _("Disable system mouse acceleration")));
+               e.disabled = 1; // the option is never available in this case, just there for show
+       }
 
        me.TR(me);
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
+       me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it"),
+       me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it"),
                        _("Allow the console toggling bind to also close the console")));
        me.TR(me);
-               me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_movement_track_canjump", _("Automatically repeat jumping if holding jump")));
-                       e.sendCvars = true;
+       me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_movement_track_canjump", _("Automatically repeat jumping if holding jump")));
+       e.sendCvars = true;
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Jetpack on jump:")));
-               me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_jetpack_jump"));
-                       e.addValue(e, ZCTX(_("JPJUMP^Disabled")), "0");
-                       e.addValue(e, _("Air only"), "1");
-                       e.addValue(e, ZCTX(_("JPJUMP^All")), "2");
-                       e.configureXonoticTextSliderValues(e);
-                       e.sendCvars = true;
+       me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Jetpack on jump:")));
+       me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_jetpack_jump"));
+       e.addValue(e, ZCTX(_("JPJUMP^Disabled")), "0");
+       e.addValue(e, _("Air only"), "1");
+       e.addValue(e, ZCTX(_("JPJUMP^All")), "2");
+       e.configureXonoticTextSliderValues(e);
+       e.sendCvars = true;
        me.TR(me);
-               if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE)
-               {
-                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", _("Use joystick input")));
-                       setDependent(e, "joy_detected", 1, 10000000);
-               }
-               else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE)
-               {
-                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", _("Use joystick input")));
-                       setDependent(e, "joy_detected", 1, 10000000);
-               }
-               else
-               {
-                       me.TD(me, 1, 3, e = makeXonoticCheckBox(0, string_null, _("Use joystick input")));
-                       e.disabled = 1; // the option is never available in this case, just there for show
-               }
+       if (cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE) {
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", _("Use joystick input")));
+               setDependent(e, "joy_detected", 1, 10000000);
+       } else if (cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE) {
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", _("Use joystick input")));
+               setDependent(e, "joy_detected", 1, 10000000);
+       } else {
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, string_null, _("Use joystick input")));
+               e.disabled = 1; // the option is never available in this case, just there for show
+       }
 }