BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks) { if(gSavedSettings.getBOOL("zmm_isinml") == 1) { if(clicks > 0) { gSavedSettings.setF32("zmm_mlfov", gSavedSettings.getF32("zmm_mlfov") / 1.1); } else if(clicks < 0) { gSavedSettings.setF32("zmm_mlfov", gSavedSettings.getF32("zmm_mlfov") * 1.1); } LLViewerCamera::getInstance()->setDefaultFOV(gSavedSettings.getF32("zmm_deffov") / gSavedSettings.getF32("zmm_mlfov")); return TRUE; } if (clicks > 0) { gAgentCamera.changeCameraToDefault(); } return TRUE; }
void LLWLAnimator::startInterpolation(const LLSD& targetWater) { mInterpBeginWL->setAll(LLWLParamManager::getInstance()->mCurParams.getAll()); mInterpBeginWater->setAll(LLWaterParamManager::getInstance()->mCurParams.getAll()); mInterpStartTime = clock(); // <FS:Ansariel> Custom Windlight interpolate time //mInterpEndTime = mInterpStartTime + clock_t(INTERP_TOTAL_SECONDS) * CLOCKS_PER_SEC; mInterpEndTime = mInterpStartTime + clock_t((F64)gSavedSettings.getF32("FSWindlightInterpolateTime")) * CLOCKS_PER_SEC; // Don't set any ending WL -- this is continuously calculated as the animator updates since it's a moving target mInterpEndWater->setAll(targetWater); mIsInterpolating = true; }
BOOL LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask) { // Singu Note: Beware the alt-click menu if (gSavedSettings.getBOOL("LiruMouselookMenu") && mask & MASK_ALT) { mMenuShown = true; return false; } LLViewerCamera& cam(LLViewerCamera::instance()); if (!mTimerFOV.getStarted()) { mStartFOV = cam.getAndSaveDefaultFOV(); mOriginalFOV = mStartFOV; } else mStartFOV = cam.getDefaultFOV(); mTargetFOV = gSavedSettings.getF32("ExodusAlternativeFOV"); gSavedSettings.getBOOL("LiruMouselookInstantZoom") ? cam.setDefaultFOV(mTargetFOV) : mTimerFOV.start(); cam.mSavedFOVLoaded = false; return TRUE; }
void LLPanelNearByMedia::updateControls() { LLUUID selected_media_id = mMediaList->getValue().asUUID(); if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID) { if (!LLViewerMedia::hasParcelAudio() || !gSavedSettings.getBOOL("AudioStreamingMusic")) { // disable controls if audio streaming music is disabled from preference showDisabledControls(); } else { showTimeBasedControls(LLViewerMedia::isParcelAudioPlaying(), false, // include_zoom false, // is_zoomed gSavedSettings.getBOOL("MuteMusic"), gSavedSettings.getF32("AudioLevelMusic") ); } } else if (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) { if (!LLViewerMedia::hasParcelMedia() || !gSavedSettings.getBOOL("AudioStreamingMedia")) { // disable controls if audio streaming media is disabled from preference showDisabledControls(); } else { LLViewerMediaImpl* impl = LLViewerParcelMedia::getParcelMedia(); if (NULL == impl) { // Just means it hasn't started yet showBasicControls(false, false, false, false, 0); } else if (impl->isMediaTimeBased()) { showTimeBasedControls(impl->isMediaPlaying(), false, // include_zoom false, // is_zoomed impl->getVolume() == 0.0, impl->getVolume() ); } else { // non-time-based parcel media showBasicControls(LLViewerMedia::isParcelMediaPlaying(), false, false, impl->getVolume() == 0.0, impl->getVolume()); } } } else { LLViewerMediaImpl* impl = LLViewerMedia::getMediaImplFromTextureID(selected_media_id); if (NULL == impl || !gSavedSettings.getBOOL("AudioStreamingMedia")) { showDisabledControls(); } else { if (impl->isMediaTimeBased()) { showTimeBasedControls(impl->isMediaPlaying(), ! impl->isParcelMedia(), // include_zoom LLViewerMediaFocus::getInstance()->isZoomed(), impl->getVolume() == 0.0, impl->getVolume()); } else { showBasicControls(!impl->isMediaDisabled(), ! impl->isParcelMedia(), // include_zoom LLViewerMediaFocus::getInstance()->isZoomed(), impl->getVolume() == 0.0, impl->getVolume()); } } } }