Exemplo n.º 1
0
BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
	if (gViewerWindow->getRightMouseDown())
	{
		LLViewerCamera& cam(LLViewerCamera::instance());
		mStartFOV = cam.getDefaultFOV();

		gSavedSettings.setF32(
			"ExodusAlternativeFOV",
			mTargetFOV = clicks > 0 ?
				llclamp(mTargetFOV += (0.05f * clicks), 0.1f, 3.0f) :
				llclamp(mTargetFOV -= (0.05f * -clicks), 0.1f, 3.0f)
		);

		if (gSavedSettings.getBOOL("LiruMouselookInstantZoom"))
			cam.setDefaultFOV(mTargetFOV);
		else
			mTimerFOV.start();
		cam.mSavedFOVLoaded = false;
	}
	else if (clicks > 0)
	{
		gAgentCamera.changeCameraToDefault();
	}
	return TRUE;
}
Exemplo n.º 2
0
BOOL LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
	/* JC - suppress context menu 8/29/2002

	// On right mouse, go through some convoluted steps to
	// make the build menu appear.
	setCurrentTool( (LLTool*) mNull );

	// This should return FALSE, meaning the context menu will
	// be shown.
	return FALSE;
	*/

	// Returning true will suppress the context menu
	// NaCl - Rightclick-mousewheel zoom
	if (!(gKeyboard->currentMask(TRUE) & MASK_ALT))
	{
		static LLCachedControl<LLVector3> _NACL_MLFovValues(gSavedSettings,"_NACL_MLFovValues");
		static LLCachedControl<F32> CameraAngle(gSavedSettings,"CameraAngle");
		LLVector3 vTemp=_NACL_MLFovValues;
		vTemp.mV[0]=CameraAngle;
		vTemp.mV[2]=1.0f;
		gSavedSettings.setVector3("_NACL_MLFovValues",vTemp);
		gSavedSettings.setF32("CameraAngle",vTemp.mV[1]);

		return TRUE;
	}
	// NaCl End

	// <FS:Ansariel> Enable context/pie menu in mouselook
	//return TRUE;
	return (!gSavedSettings.getBOOL("FSEnableRightclickMenuInMouselook"));
	// </FS:Ansariel>
}
Exemplo n.º 3
0
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;
}
Exemplo n.º 4
0
// NaCl - Rightclick-mousewheel zoom
BOOL LLToolCompGun::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
	static LLCachedControl<LLVector3> _NACL_MLFovValues(gSavedSettings,"_NACL_MLFovValues");
	static LLCachedControl<F32> CameraAngle(gSavedSettings,"CameraAngle");
	LLVector3 vTemp=_NACL_MLFovValues;
	// Only reset if zoomed
	if (vTemp.mV[2] == 1.0f)
	{
		vTemp.mV[1]=CameraAngle;
		vTemp.mV[2]=0.0f;
		gSavedSettings.setVector3("_NACL_MLFovValues",vTemp);
		gSavedSettings.setF32("CameraAngle",vTemp.mV[0]);
	}
	return TRUE;
}
void LLPanelNearByMedia::onCommitSelectedMediaVolume()
{
	LLUUID selected_media_id = mMediaList->getValue().asUUID();
	if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID)
	{
		F32 vol = mVolumeSlider->getValueF32();
		gSavedSettings.setF32("AudioLevelMusic", vol);
	}
	else {
		LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?
			((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
		if (NULL != impl)
		{
			impl->setVolume(mVolumeSlider->getValueF32());
		}
	}
}
Exemplo n.º 6
0
BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
	// NaCl - Rightclick-mousewheel zoom
	static LLCachedControl<LLVector3> _NACL_MLFovValues(gSavedSettings, "_NACL_MLFovValues");
	static LLCachedControl<F32> CameraAngle(gSavedSettings, "CameraAngle");
	LLVector3 vTemp = _NACL_MLFovValues;
	vTemp.mV[VY] = CameraAngle;
	if (vTemp.mV[VZ] > 0.0f)
	{
		vTemp.mV[VY] = llclamp(vTemp.mV[VY] + (F32)(clicks * 0.1f), LLViewerCamera::getInstance()->getMinView(), LLViewerCamera::getInstance()->getMaxView());
		gSavedSettings.setVector3("_NACL_MLFovValues", vTemp);
		gSavedSettings.setF32("CameraAngle", vTemp.mV[VY]);
	}
	else if (clicks > 0 && gSavedSettings.getBOOL("FSScrollWheelExitsMouselook"))
	// NaCl End
	{
		gAgentCamera.changeCameraToDefault();

	}
	return TRUE;
}