From dbb613a2d88fda507b7e3ac46e938f4258a70ec8 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 2 Jul 2019 16:52:21 +0300 Subject: SL-11456 Allow scaling of HUD attachments --- indra/newview/llagentcamera.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llagentcamera.cpp') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 92a3026096..fd8797481d 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -807,6 +807,12 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction) startCameraAnimation(); } +F32 LLAgentCamera::getAgentHUDTargetZoom() +{ + static LLCachedControl hud_scale_factor(gSavedSettings, "HUDScaleFactor"); + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + return (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) ? hud_scale_factor*gAgentCamera.mHUDTargetZoom : hud_scale_factor; +} //----------------------------------------------------------------------------- // cameraOrbitAround() -- cgit v1.2.3