From: TimePath Date: Mon, 15 Dec 2014 05:58:42 +0000 (+1100) Subject: Merge branch 'master' into TimePath/issue-1170 X-Git-Tag: xonotic-v0.8.0~73^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e3c57d4e706a9ee1342e25a178955162f4f5925f;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into TimePath/issue-1170 Conflicts: qcsrc/menu/classes.c qcsrc/menu/xonotic/dialog_settings_input.c qcsrc/menu/xonotic/dialog_settings_misc.c qcsrc/menu/xonotic/mainwindow.c --- e3c57d4e706a9ee1342e25a178955162f4f5925f diff --cc qcsrc/menu/classes.c index 600632249,9b872cbf2..bc60898c8 --- a/qcsrc/menu/classes.c +++ b/qcsrc/menu/classes.c @@@ -114,4 -123,4 +123,5 @@@ #include "xonotic/dialog_hudpanel_buffs.c" #include "xonotic/slider_picmip.c" #include "xonotic/slider_particles.c" + #include "xonotic/slider_sbfadetime.c" +#include "xonotic/dialog_settings_misc_reset.c" diff --cc qcsrc/menu/xonotic/dialog_settings_input.c index c8ba7c4fd,f58ce1572..4287f1f82 --- a/qcsrc/menu/xonotic/dialog_settings_input.c +++ b/qcsrc/menu/xonotic/dialog_settings_input.c @@@ -20,16 -27,13 +27,13 @@@ void CheckBox_Click_Redisplay(entity me void XonoticInputSettingsTab_fill(entity me) { entity e; - entity kb; + entity kb = makeXonoticKeyBinder(); me.TR(me); - me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Key bindings:"))); - me.TD(me, 1, 1, e = makeXonoticButton(_("Reset all"), '0 0 0')); - e.onClick = KeyBinder_Bind_Reset_All; - e.onClickEntity = kb; + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Key Bindings"))); me.TR(me); - me.TD(me, me.rows - 2.5, 3, kb = makeXonoticKeyBinder()); - me.gotoRC(me, me.rows - 1.5, 0); + me.TD(me, me.rows - 4, 3, kb); + me.gotoRC(me, me.rows - 3, 0); me.TD(me, 1, 1, e = makeXonoticButton(_("Change key..."), '0 0 0')); e.onClick = KeyBinder_Bind_Change; e.onClickEntity = kb; @@@ -44,52 -48,58 +48,62 @@@ 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.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it"))); + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Mouse"))); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_movement_track_canjump", _("Automatically repeat jumping if holding jump"))); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Sensitivity:"))); + me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity")); me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_filter", _("Smooth aiming"))); me.TR(me); - if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE) - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", _("Use joystick input"))); - else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE) - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", _("Use joystick input"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox(1.022, "m_pitch", _("Invert aiming"))); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticCheckBox(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.TR(me); + if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE) + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_dgamouse", _("Disable system mouse acceleration"))); + 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, _("Use joystick input"))); + 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 = makeXonoticTextLabel(0, _("Mouse:"))); + me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other"))); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Sensitivity:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity")); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it"))); me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "m_filter", _("Smooth aiming"))); + 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.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1.022, "m_pitch", _("Invert aiming"))); me.TR(me); - me.TDempty(me, 0.2); - if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE) - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "vid_dgamouse", _("Disable system mouse acceleration"))); - else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE) - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Disable system mouse acceleration"))); + 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, 2.8, e = makeXonoticCheckBox(0, string_null, _("Disable system mouse acceleration"))); + 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 } - me.TR(me); - me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "m_accelerate", _("Enable built in mouse acceleration"))); - - - me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_movement_track_canjump", COMMANDBUTTON_APPLY)); } #endif diff --cc qcsrc/menu/xonotic/dialog_settings_misc.c index 489b00967,0fd2db2fe..1deda87df --- a/qcsrc/menu/xonotic/dialog_settings_misc.c +++ b/qcsrc/menu/xonotic/dialog_settings_misc.c @@@ -138,23 -124,15 +124,20 @@@ void XonoticMiscSettingsTab_fill(entit e.addValue(e, ZCTX(_("TLTIP^Advanced")), "2"); e.configureXonoticTextSliderValues(e); me.TR(me); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", _("Show current time"))); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showdate", _("Show current date"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", _("Show current date and time"))); + makeMulti(e, "showdate"); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "developer", _("Enable developer mode"))); -- me.TR(me); ++ me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.cvarsDialog; + me.TR(me); + me.TDempty(me, 0.5); + me.TD(me, 1, 2, e = makeXonoticButton(_("Factory reset"), '0 0 0')); + e.onClick = DialogOpenButton_Click; + e.onClickEntity = main.resetDialog; - me.TR(me); } #endif diff --cc qcsrc/menu/xonotic/keybinder.c index d54ab6671,57f501f5c..6fe961871 --- a/qcsrc/menu/xonotic/keybinder.c +++ b/qcsrc/menu/xonotic/keybinder.c @@@ -238,15 -238,9 +238,15 @@@ void KeyBinder_Bind_Clear(entity btn, e localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state cvar_set("_hud_showbinds_reload", "1"); } +void KeyBinder_Bind_Reset_All(entity btn, entity me) +{ + localcmd("exec binds-default.cfg\n"); + localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state + cvar_set("_hud_showbinds_reload", "1"); +} void XonoticKeyBinder_clickListBoxItem(entity me, float i, vector where) { - if(i == me.lastClickedServer) + if(i == me.lastClickedKey) if(time < me.lastClickedTime + 0.3) { // DOUBLE CLICK! diff --cc qcsrc/menu/xonotic/mainwindow.c index 480e801d4,6eba4f7a7..6fa40bfac --- a/qcsrc/menu/xonotic/mainwindow.c +++ b/qcsrc/menu/xonotic/mainwindow.c @@@ -20,7 -17,8 +17,9 @@@ CLASS(MainWindow) EXTENDS(ModalControll ATTRIB(MainWindow, mainNexposee, entity, NULL) ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND) ATTRIB(MainWindow, dialogToShow, entity, NULL) + ATTRIB(MainWindow, demostartconfirmDialog, entity, NULL) + ATTRIB(MainWindow, demotimeconfirmDialog, entity, NULL) + ATTRIB(MainWindow, resetDialog, entity, NULL) ENDCLASS(MainWindow) #endif