Add Double-click Autopilot option to System->General preferences.

Translators:
Nomade: Please review the french System->General and make sure it reads properly
Damian: Please take care of translating panel_preferences_ascent_system.xml
miKa: Please update the translation of panel_preferences_ascent_system.xml so it reads properly.
This commit is contained in:
Lirusaito
2015-11-13 13:06:33 -05:00
parent 966be89d98
commit 855e1d9caa
6 changed files with 26 additions and 16 deletions

View File

@@ -654,6 +654,19 @@ static bool handleAllowLargeSounds(const LLSD& newvalue)
return true;
}
enum DCAction { AUTOPILOT, TELEPORT };
static void handleDoubleClickActionChanged(const DCAction& action, const LLSD& newvalue)
{
// Doubleclick actions - there can be only one
if (newvalue.asBoolean())
{
if (action == AUTOPILOT)
gSavedSettings.setBOOL("DoubleClickTeleport", false);
else
gSavedSettings.setBOOL("DoubleClickAutopilot", false);
}
}
void handleHighResChanged(const LLSD& val)
{
if (val) // High Res Snapshot active, must uncheck RenderUIInSnapshot
@@ -855,6 +868,8 @@ void settings_setup_listeners()
gSavedSettings.getControl("AllowLargeSounds")->getSignal()->connect(boost::bind(&handleAllowLargeSounds, _2));
gSavedSettings.getControl("LiruUseZQSDKeys")->getSignal()->connect(boost::bind(load_default_bindings, _2));
gSavedSettings.getControl("DoubleClickAutopilot")->getSignal()->connect(boost::bind(handleDoubleClickActionChanged, AUTOPILOT, _2));
gSavedSettings.getControl("DoubleClickTeleport")->getSignal()->connect(boost::bind(handleDoubleClickActionChanged, TELEPORT, _2));
gSavedSettings.getControl("HighResSnapshot")->getSignal()->connect(boost::bind(&handleHighResChanged, _2));
}