Пример #1
0
void GetPlayerKeyBoardInputForBriefingRoomEnterHomePage( void )
{
	InputAtom					InputEvent;
	POINT	MousePos;

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

	while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
	{
		// 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
						ProcessPlayerInputActivationBriefingRoomEnterString( );

					fNewCharInActivationBriefingRoomEnterString = 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 )
					{
						HandleBriefingRoomEnterTextEvent( InputEvent.usParam );
					}
				break;
			}
		}
	}

	return;
}
Пример #2
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;
}
Пример #3
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;
}
Пример #4
0
void GetPlayerKeyBoardInputForIMPBeginScreen( void )
{
	InputAtom					InputEvent;
	POINT  MousePos;

	// get the current curosr position, might just need it.
	GetCursorPos(&MousePos);	 
	
	// handle input events
  while( DequeueEvent(&InputEvent) )
  { 
	 /*
		// 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) )
		{
		  switch( InputEvent.usParam )
			{
			case (( ENTER )):
          // check to see if gender was highlighted..if so, select it
			    if( FEMALE_GENDER_SELECT  == ubTextEnterMode )
					{
				     bGenderFlag = IMP_FEMALE;
					}
			     else if( MALE_GENDER_SELECT  == ubTextEnterMode  )
					 {
				     bGenderFlag = IMP_MALE;
					 }

			     // increment to next selection box
			     IncrementTextEnterMode( );
			     fNewCharInString = TRUE;
				break;
			case( SPACE ):
				// handle space bar
				if( FEMALE_GENDER_SELECT  == ubTextEnterMode )
				{
				  bGenderFlag = IMP_FEMALE;
					DecrementTextEnterMode( );
				}
			  else if( MALE_GENDER_SELECT  == ubTextEnterMode  )
				{
				  bGenderFlag = IMP_MALE;
					IncrementTextEnterMode( );
				}
				else
				{
					HandleBeginScreenTextEvent( InputEvent.usParam );
				}
				fNewCharInString = TRUE;
				break;
		    case (( ESC )):
          LeaveLapTopScreen( );
				break;
				case (( TAB )):
			    // tab hit, increment to next selection box
          IncrementTextEnterMode( );
		      fNewCharInString = TRUE;
				  break;
				case ( 265 ):
				  // tab and shift
					DecrementTextEnterMode( );
					fNewCharInString = TRUE;
				break;
				default:
					HandleBeginScreenTextEvent( InputEvent.usParam );
				break;
			}
		}
  }
	return;
}