void TetrixController::OnLeftButtonDownEvent(WPARAM wParam, LPARAM lParam) { if (GamePreparing == m_status || GameEnded == m_status) { int x = LOWORD(lParam); int y = HIWORD(lParam); RECT rect; ::GetClientRect(m_hWnd, &rect); int w = rect.right - rect.left; int h = rect.bottom - rect.top; if (abs(x - w / 2) <= w / 8) { int ph = w / 4 / 3; if (y >= h / 2 && y <= (h / 2 + ph)) { m_spSound->PlayClick(); StartGame(); } else if (y >= (h / 2 + ph * 2) && y <= (h / 2 + ph * 3)) { if (GamePreparing == m_status) { m_spSound->PlayClick(); ::PostQuitMessage(0); } else { m_spSound->PlayClick(); BackToMenu(); } } } } }
void GameInfoViewer::BackToMenuButtonClicked() { emit BackToMenu(); }
void GameLevelChooser::MenuButtonPressed() { emit BackToMenu(); }