From 3e86e9171fe6c1dcad25f8ca0cd25b1dfa2fe85e Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 10 Jun 2011 20:15:07 -0700 Subject: Added AO toolbar option to preferences > advanced --- linden/indra/newview/llprefsadvanced.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'linden/indra/newview/llprefsadvanced.cpp') diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index a9500f7..087acc9 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp @@ -48,6 +48,9 @@ LLPrefsAdvanced* LLPrefsAdvanced::sInstance; LLPrefsAdvanced::LLPrefsAdvanced() +: + mWLControl(FALSE), + mAOControl(FALSE) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_advanced.xml"); if(sInstance)delete sInstance; @@ -99,6 +102,10 @@ BOOL LLPrefsAdvanced::postBuild() childSetValue("show_timestamps_check", gSavedSettings.getBOOL("ShowTimestamps")); childSetValue("arrow_keys_move_avatar_check", gSavedSettings.getBOOL("ArrowKeysMoveAvatar")); + static BOOL *sEnableAORemote = rebind_llcontrol("EnableAORemote", &gSavedSettings, true); + childSetValue("ao_remote_check", *sEnableAORemote); + mAOControl = (*sEnableAORemote); + refresh(); return TRUE; @@ -198,6 +205,9 @@ void LLPrefsAdvanced::apply() gSavedSettings.setBOOL("ArrowKeysMoveAvatar", childGetValue("arrow_keys_move_avatar_check")); gSavedSettings.setBOOL("ScriptErrorsAsChat", childGetValue("script_errors_as_chat")); gSavedSettings.setBOOL("ShowTimestamps", childGetValue("show_timestamps_check")); + + static BOOL *sEnableAORemote = rebind_llcontrol("EnableAORemote", &gSavedSettings, true); + mAOControl = *sEnableAORemote; } void LLPrefsAdvanced::cancel() @@ -208,6 +218,7 @@ void LLPrefsAdvanced::cancel() // LLVOAvatar::sCloud.mPartData.mEndColor = mCloudEndColor; gSavedSettings.setBOOL("EnableWindlightRemote", mWLControl); + gSavedSettings.setBOOL("EnableAORemote", mAOControl); } void LLPrefsAdvanced::refresh() -- cgit v1.1