LTBOOL CFolderDisplay::OnLButtonUp(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 "enter" message to the control. if (nControlIndex == m_nLMouseDownItemSel) { if (pCtrl->IsEnabled() ) { if (pCtrl == m_pRendererCtrl) { // Get the current resolution FolderDisplayResolution currentResolution=GetCurrentSelectedResolution(); LTBOOL handled = pCtrl->OnLButtonUp(x, y); if (handled) { SetupResolutionCtrl(); // Set the resolution for the control SetCurrentCtrlResolution(currentResolution); } return handled; } else if (pCtrl == m_pHardwareCursor) { return OnRight(); } else { SetSelection(nControlIndex); return CBaseFolder::OnLButtonUp(x,y); } } } } else { m_nLMouseDownItemSel= kNoSelection; } return LTFALSE; }
bool CScreenDisplay::OnLButtonUp(int x, int y) { uint16 nControlIndex=0; if (GetControlUnderPoint(x, y, &nControlIndex)) { CLTGUICtrl* pCtrl = GetControl(nControlIndex); if (pCtrl == m_pGamma) { if (!pCtrl->OnLButtonUp(x,y)) return false; pCtrl->UpdateData(); float fGamma = ConvertToGamma(m_nGamma); WriteConsoleFloat("GammaR",fGamma); WriteConsoleFloat("GammaG",fGamma); WriteConsoleFloat("GammaB",fGamma); return true; } } return CBaseScreen::OnLButtonUp(x, y); }
LTBOOL CScreenDisplay::OnLButtonUp(int x, int y) { uint16 nControlIndex=0; if (GetControlUnderPoint(x, y, &nControlIndex)) { CLTGUICtrl* pCtrl = GetControl(nControlIndex); if (pCtrl == m_pHardwareCursor) { return OnRight(); } if (pCtrl == m_pGamma) { if (!pCtrl->OnLButtonUp(x,y)) return LTFALSE; pCtrl->UpdateData(); float fGamma = ConvertToGamma(m_nGamma); WriteConsoleFloat("GammaR",fGamma); WriteConsoleFloat("GammaG",fGamma); WriteConsoleFloat("GammaB",fGamma); return LTTRUE; } } return CBaseScreen::OnLButtonUp(x, y); }