Пример #1
0
void ActionMenu::ProcessInput()
{
	if (!m_bChoiceLocked && !m_bExpired)
	{
		if (m_numChoices == 2)
		{
			if (InputMgr::Instance().WasPressed(VK_LEFT) && m_activeChoice != 0)
				SelectAction(0);

			else if (InputMgr::Instance().WasPressed(VK_RIGHT) && m_activeChoice != 1)
				SelectAction(1);
		}
		else if (m_numChoices == 4)
		{
			if (InputMgr::Instance().WasPressed(VK_UP) && m_activeChoice != 0)
				SelectAction(0);

			else if (InputMgr::Instance().WasPressed(VK_RIGHT) && m_activeChoice != 1)
				SelectAction(1);

			else if (InputMgr::Instance().WasPressed(VK_DOWN) && m_activeChoice != 2)
				SelectAction(2);

			else if (InputMgr::Instance().WasPressed(VK_LEFT) && m_activeChoice != 3)
				SelectAction(3);
		}

		if (InputMgr::Instance().WasPressed(GEN_A))
			ConfirmAction();

		if (InputMgr::Instance().WasPressed(GEN_B))
			DismissMenu();
	}
}
Пример #2
0
void QuitWmSignalHandler (int dummy)
{
    if (wmGD.showFeedback & WM_SHOW_FB_KILL)
    {
	ConfirmAction (ACTIVE_PSD, QUIT_MWM_ACTION);
	XFlush(DISPLAY);
    }
    else
    {
	Do_Quit_Mwm(False);
    }

} /* END OF FUNCTION QuitWmSignalHandler */