Example #1
0
void GetPlayerKeyBoardInputForIMPHomePage( void )
{
    InputAtom					InputEvent;
    POINT  MousePos;

    GetCursorPos(&MousePos);

    while (DequeueEvent(&InputEvent) == TRUE)
    {
        // HOOK INTO MOUSE HOOKS
        /*
        switch(InputEvent.usEvent)
        {
        	case LEFT_BUTTON_DOWN:
        		MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
        		break;
        	case LEFT_BUTTON_UP:
        		MouseSystemHook(LEFT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y ,_LeftButtonDown, _RightButtonDown);
        		break;
        	case RIGHT_BUTTON_DOWN:
        		MouseSystemHook(RIGHT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
        		break;
        	case RIGHT_BUTTON_UP:
        		MouseSystemHook(RIGHT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
        		break;
        }
        */
        if(	!HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT || InputEvent.usEvent == KEY_UP ) )
        {
            switch( InputEvent.usParam )
            {
            case (( ENTER ) ):
                if(( InputEvent.usEvent == KEY_UP ) )
                {
                    // return hit, check to see if current player activation string is a valid one
                    ProcessPlayerInputActivationString( );

                    fNewCharInActivationString = TRUE;
                }
                break;
            case (( ESC )):
                LeaveLapTopScreen( );
                break;
            default:
                if(InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT )
                {
                    HandleTextEvent( InputEvent.usParam );
                }
                break;
            }
        }
    }

    return;
}
Example #2
0
void GetPlayerKeyBoardInputForIMPHomePage( void )
{
	InputAtom					InputEvent;
	POINT	MousePos;

	GetCursorPos(&MousePos);
	ScreenToClient(ghWindow, &MousePos); // In window coords!

	while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
	{
		if(	!HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT || InputEvent.usEvent == KEY_UP ) )
		{
		switch( InputEvent.usParam )
			{
			case (( ENTER ) ):
					if(( InputEvent.usEvent == KEY_UP ) )
					{
						// return hit, check to see if current player activation string is a valid one
						ProcessPlayerInputActivationString( );

					fNewCharInActivationString = TRUE;
					}
				break;
				case (( ESC )):
			HandleLapTopESCKey();		// WANNE: Fix for proper closing of the IMP laptop page
			LeaveLapTopScreen( );
				break;
				default:
					if(InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT )
					{
						HandleTextEvent( InputEvent.usParam );
					}
				break;
			}
		}
	}

	return;
}