FIRE-1937: Double click teleport hotkey shortcut, with dynamic updating of UI controls and awareness of doubleclick-walk, by Selo Jacobus
parent
73e06cba36
commit
0ac03c861f
|
|
@ -372,6 +372,10 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
|
||||
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
|
||||
|
||||
//[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ]
|
||||
gSavedSettings.getControl("DoubleClickTeleport")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::onChangeDoubleClickSettings, this));
|
||||
|
||||
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
|
||||
}
|
||||
|
||||
|
|
@ -1737,6 +1741,32 @@ void LLFloaterPreference::updateDoubleClickSettings()
|
|||
}
|
||||
}
|
||||
|
||||
//[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ]
|
||||
void LLFloaterPreference::onChangeDoubleClickSettings()
|
||||
{
|
||||
bool double_click_action_enabled = gSavedSettings.getBOOL("DoubleClickAutoPilot") || gSavedSettings.getBOOL("DoubleClickTeleport");
|
||||
LLCheckBoxCtrl* double_click_action_cb = getChild<LLCheckBoxCtrl>("double_click_chkbox");
|
||||
if (double_click_action_cb)
|
||||
{
|
||||
// check checkbox if one of double-click actions settings enabled, uncheck otherwise
|
||||
double_click_action_cb->setValue(double_click_action_enabled);
|
||||
}
|
||||
LLRadioGroup* double_click_action_radio = getChild<LLRadioGroup>("double_click_action");
|
||||
if (!double_click_action_radio) return;
|
||||
// set radio-group enabled if one of double-click actions settings enabled
|
||||
double_click_action_radio->setEnabled(double_click_action_enabled);
|
||||
if (gSavedSettings.getBOOL("DoubleClickTeleport"))
|
||||
{
|
||||
double_click_action_radio->setSelectedIndex(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
double_click_action_radio->setSelectedIndex(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onClickProxySettings()
|
||||
{
|
||||
LLFloaterReg::showInstance("prefs_proxy");
|
||||
|
|
|
|||
|
|
@ -174,6 +174,8 @@ public:
|
|||
void onClickProxySettings();
|
||||
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
|
||||
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
|
||||
//[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ]
|
||||
void onChangeDoubleClickSettings();
|
||||
|
||||
void buildPopupLists();
|
||||
static void refreshSkin(void* data);
|
||||
|
|
|
|||
|
|
@ -7283,6 +7283,25 @@ class LLAdvancedClickRenderShadowOption: public view_listener_t
|
|||
}
|
||||
};
|
||||
|
||||
//[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ]
|
||||
class LLAdvancedToggleDoubleClickTeleport: public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
|
||||
BOOL checked = gSavedSettings.getBOOL( "DoubleClickTeleport" );
|
||||
if (checked)
|
||||
{
|
||||
gSavedSettings.setBOOL( "DoubleClickTeleport", false );
|
||||
}
|
||||
else
|
||||
{
|
||||
gSavedSettings.setBOOL( "DoubleClickTeleport", true );
|
||||
gSavedSettings.setBOOL( "DoubleClickAutoPilot", false );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
void menu_toggle_attached_lights(void* user_data)
|
||||
{
|
||||
LLPipeline::sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
|
||||
|
|
@ -8800,7 +8819,8 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new LLAdvancedHandleAttachedLightParticles(), "Advanced.HandleAttachedLightParticles");
|
||||
view_listener_t::addMenu(new LLAdvancedCheckRenderShadowOption(), "Advanced.CheckRenderShadowOption");
|
||||
view_listener_t::addMenu(new LLAdvancedClickRenderShadowOption(), "Advanced.ClickRenderShadowOption");
|
||||
|
||||
//[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ]
|
||||
view_listener_t::addMenu(new LLAdvancedToggleDoubleClickTeleport, "Advanced.ToggleDoubleClickTeleport");
|
||||
|
||||
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
|
||||
view_listener_t::addMenu(new LLAdvancedHandleToggleHackedGodmode(), "Advanced.HandleToggleHackedGodmode");
|
||||
|
|
|
|||
|
|
@ -2222,7 +2222,20 @@
|
|||
parameter="UseDebugMenus" />
|
||||
</menu_item_check>
|
||||
|
||||
<menu_item_separator/>
|
||||
<!-- //[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ] -->
|
||||
<menu_item_check
|
||||
label="DoubleClick Teleport"
|
||||
name="DoubleClick Teleport"
|
||||
shortcut="control|shift|D">
|
||||
<on_check
|
||||
function="CheckControl"
|
||||
parameter="DoubleClickTeleport" />
|
||||
<on_click
|
||||
function="Advanced.ToggleDoubleClickTeleport"/>
|
||||
</menu_item_check>
|
||||
<!-- //[FIX FIRE-1927 - enable DoubleClickTeleport shortcut : SJ] -->
|
||||
|
||||
<menu_item_separator/>
|
||||
|
||||
<menu_item_check
|
||||
label="Always Run"
|
||||
|
|
|
|||
Loading…
Reference in New Issue