LTBOOL CFolderDisplay::OnRButtonUp(int x, int y)
{
	// Get the control that the click was on
	int nControlIndex=0;
	if (GetControlUnderPoint(x, y, &nControlIndex))
	{
		CLTGUICtrl* pCtrl = GetControl(nControlIndex);
		if (m_pCaptureCtrl && pCtrl != m_pCaptureCtrl)
            return LTFALSE;

		// If the mouse is over the same control now as it was when the down message was called
		// then send the "left" message to the control.
		if (nControlIndex == m_nRMouseDownItemSel)
		{
			if (pCtrl->IsEnabled())
			{
				if (GetSelectedControl() == m_pRendererCtrl)
				{

					// Get the current resolution
					FolderDisplayResolution currentResolution=GetCurrentSelectedResolution();
                    LTBOOL handled = pCtrl->OnRButtonUp(x,y);
					if (handled)
					{
						SetupResolutionCtrl();
						// Set the resolution for the control
						SetCurrentCtrlResolution(currentResolution);
					}
					return handled;
				}
				else if (pCtrl == m_pHardwareCursor)
				{
					return OnLeft();
				}
				else
				{
					SetSelection(nControlIndex);
					return CBaseFolder::OnRButtonUp(x,y);
				}
			}
		}
	}
	else
	{
		m_nRMouseDownItemSel= kNoSelection;
	}
    return LTFALSE;
}
예제 #2
0
bool CScreenDisplay::OnRButtonUp(int x, int y)
{
	uint16 nControlIndex=0;
	if (GetControlUnderPoint(x, y, &nControlIndex))
	{
		CLTGUICtrl* pCtrl = GetControl(nControlIndex);
		if (pCtrl == m_pGamma)
		{
			if (!pCtrl->OnRButtonUp(x,y)) return false;
			pCtrl->UpdateData();
			float fGamma = ConvertToGamma(m_nGamma);
			WriteConsoleFloat("GammaR",fGamma);
			WriteConsoleFloat("GammaG",fGamma);
			WriteConsoleFloat("GammaB",fGamma);
			return true;
		}
	}
	return CBaseScreen::OnRButtonUp(x, y);
}
예제 #3
0
LTBOOL CScreenDisplay::OnRButtonUp(int x, int y)
{
	uint16 nControlIndex=0;
	if (GetControlUnderPoint(x, y, &nControlIndex))
	{
		CLTGUICtrl* pCtrl = GetControl(nControlIndex);
		if (pCtrl == m_pHardwareCursor)
		{
			return OnLeft();
		}
		if (pCtrl == m_pGamma)
		{
			if (!pCtrl->OnRButtonUp(x,y)) return LTFALSE;
			pCtrl->UpdateData();
			float fGamma = ConvertToGamma(m_nGamma);
			WriteConsoleFloat("GammaR",fGamma);
			WriteConsoleFloat("GammaG",fGamma);
			WriteConsoleFloat("GammaB",fGamma);
			return LTTRUE;
		}
	}
	return CBaseScreen::OnRButtonUp(x, y);
}