Beispiel #1
0
int updateMainWin() {
	int ch = 0;
	switch (mainWinState) {
	case MSW_INIT:
		resetMenuPos();
		displayMenu(mainWin);
		mainWinState = MWS_IDLE;
		break;
	case MWS_IDLE:
		logPrint("Waiting for command to begin or quit\n");
		ch = wgetch(mainWin);
		if (ch == 'b' || ch == 'B') {
			moveMenuHorizontal(1);// highlight the first menu item in the first run.
			displayMenu(mainWin);
			mainWinState = MWS_MENU_NAV;
		}
		break;
	case MWS_MENU_NAV:
		ch = wgetch(mainWin);
		menuNavigate(ch);
		displayMenu(mainWin);
		//printMenuGraph();
		break;
	case MWS_PRINT:
		break;
	}
	return 0;
}
Beispiel #2
0
Datei: mou.c Projekt: bqv/ntris
void mouUp(int x, int y, tEngGame *pEngGame)
{
    switch (mouState)
    {
    case eMouStateMenu:
    {
        menuNavigate(eMenuForward);
        break;
    }
    case eMouStateViewChange:
    case eMouStateNone:
    default:
    {
        break;
    }
    }

    mouDowned = 0;
    mouState = eMouStateNone;

    mouLastX = x;
    mouLastY = y;
}