Exemplo n.º 1
0
//------------
//
void PrintRight( word windowRgn, dword x, dword y, dword maxX, const char *str, dword fcolor, dword bcolor, byte fntSize)
{
	dword width = 0, offset = 0;

	width = TAP_Osd_GetW( str, 0, fntSize );

	if ( width <= (maxX-x) ) offset = (maxX - width);				// right justify text
	else offset = x;												// too wide - fill width

	switch ( fntSize )
	{
		case FNT_Size_1419 : if ( bcolor > 0 ) TAP_Osd_FillBox( windowRgn, x, y-1, maxX-x, 21, bcolor );
	                         TAP_Osd_PutS(windowRgn, x, y, maxX, str, fcolor, bcolor, 0, fntSize, FALSE, ALIGN_RIGHT);
							 break;
							 
							
		case FNT_Size_1622 : if ( bcolor > 0 ) TAP_Osd_FillBox( windowRgn, x, y-1, maxX-x, 24, bcolor );
	                         TAP_Osd_PutS(windowRgn, x, y, maxX, str, fcolor, bcolor, 0, fntSize, FALSE, ALIGN_RIGHT);
							 break;
							 
		case FNT_Size_1926 : if ( bcolor > 0 ) TAP_Osd_FillBox( windowRgn, x, y-1, maxX-x, 28, bcolor );
	                         TAP_Osd_PutS(windowRgn, x, y, maxX, str, fcolor, bcolor, 0, fntSize, FALSE, ALIGN_RIGHT);
							 break;
							 
		default : break;
	}
	
}
Exemplo n.º 2
0
//------------
//
void PrintCenter( word windowRgn, dword x, dword y, dword maxX, const char *str, dword fcolor, dword bcolor, byte fntSize)
{
	dword width = 0, offset = 0;

	width = TAP_Osd_GetW( str, 0, fntSize );

	if ( width <= (maxX-x) ) offset = (maxX - x - width)/2;				// centralise text
	else offset = 5;													// too wide - fill width

	switch ( fntSize )
	{
		case FNT_Size_1419 : if ( bcolor > 0 ) TAP_Osd_FillBox( windowRgn, x, y-1, maxX-x, 21, bcolor );
							 TAP_Osd_PutStringAf1419( windowRgn, x+offset, y, maxX, str, fcolor, bcolor);
							 break;
							
		case FNT_Size_1622 : if ( bcolor > 0 ) TAP_Osd_FillBox( windowRgn, x, y-1, maxX-x, 24, bcolor );
							 TAP_Osd_PutStringAf1622( windowRgn, x+offset, y, maxX, str, fcolor, bcolor);
							 break;
							 
		case FNT_Size_1926 : if ( bcolor > 0 ) TAP_Osd_FillBox( windowRgn, x, y-1, maxX-x, 28, bcolor );
							 TAP_Osd_PutStringAf1926( windowRgn, x+offset, y, maxX, str, fcolor, bcolor);
							 break;
							 
		default : break;
	}

	
}
Exemplo n.º 3
0
void DisplayMenu( menu_Struct *menu )
{
	int i;
	word h1, v1, x1, x2, y1, y2;
	char str[256];

    TAP_Osd_FillBox( rgn, 0, 0, 720, 576, FILL_COLOUR );				// Clear the screen
    TAP_Osd_PutGd( rgn, (MENU_X - 11), MENU_Y - 8, &_menu_titleGd, TRUE );

																		// Draw boarders - calculate coords first:
	h1 = MENU_ROW_W + 16;												// horizontal width
	v1 = ((MAX_NUMBER_OF_MENU_ITEMS+1) * MENU_STEP) + 8;				// vertical width - num of items + extended text line

	x1 = MENU_X - 10;													// top right
	y1 = MENU_Y + MENU_STEP - 12;

	x2 = x1 + h1;														// bottom left
	y2 = y1 + v1;

	
    TAP_Osd_FillBox( rgn, x1, y1, 4, v1, TITLE_COLOUR );				// left boarder line
    TAP_Osd_FillBox( rgn, x2, y1, 4, v1, TITLE_COLOUR );				// right boarder line
    TAP_Osd_FillBox( rgn, x1, y2, h1+4, 4, TITLE_COLOUR );				// bottom boarder line

	TAP_Osd_PutStringAf1926( rgn, MENU_X+20, MENU_Y+2, MENU_X + 100, menu->title, TITLE_COLOUR, 0 );	// Print the title

	for ( i=1 ; i <= (menu->count) ; i++ )								// for each row on the menu
	{
		DisplayMenuLine( menu, i );										// display the text
	}
}
Exemplo n.º 4
0
//-----------------------------------------------------------------------
//
void DisplayYesNoWindow(char* title, char* line1, char* line2, char* button1, char* button2, int defaultOption, void (*ReturningProcedure)( bool ) )
{
	YesNoCallback = ReturningProcedure;

    yesnoWindowShowing = TRUE;
    YesNoOption = defaultOption;

	// Store the currently displayed screen area where we're about to put our pop-up window on.
    YesNoWindowCopy = TAP_Osd_SaveBox(rgn, YESNO_WINDOW_X, YESNO_WINDOW_Y, YESNO_WINDOW_W, YESNO_WINDOW_H);

    #ifdef WIN32  // If testing on WIN32 platform 
    TAP_Osd_FillBox( rgn,YESNO_WINDOW_X, YESNO_WINDOW_Y, YESNO_WINDOW_W, YESNO_WINDOW_H, FILL_COLOUR );				// clear the screen
    #endif          

    // Display the pop-up window.
    TAP_Osd_PutGd( rgn, YESNO_WINDOW_X, YESNO_WINDOW_Y, &_popup360x180Gd, TRUE );
	
    // Display Title and information in pop-up window
	PrintCenter( rgn, YESNO_WINDOW_X+5, YESNO_WINDOW_Y +  13, YESNO_WINDOW_X+YESNO_WINDOW_W-5, title, MAIN_TEXT_COLOUR, 0, FNT_Size_1926 );
	PrintCenter( rgn, YESNO_WINDOW_X+5, YESNO_WINDOW_Y +  56, YESNO_WINDOW_X+YESNO_WINDOW_W-5, line1, MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );
	PrintCenter( rgn, YESNO_WINDOW_X+5, YESNO_WINDOW_Y +  89, YESNO_WINDOW_X+YESNO_WINDOW_W-5, line2, MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );
    
    strcpy(YesNoButton1,button1);
    strcpy(YesNoButton2,button2);
    
    DisplayYesNoLine();
}
Exemplo n.º 5
0
void DialogWindowHide (void)
{
  if (!FBDialogWindow || !FBDialogWindow->isVisible || !FBDialogProfile) return;

  if (FBDialogWindow->Multiple)
  {
    if (FBDialogWindow->MultipleOSDSaveBox)
    {
      TAP_Osd_RestoreBox (FBDialogWindow->OSDRgn, 0, 0, GetOSDRegionWidth(FBDialogWindow->OSDRgn), GetOSDRegionHeight(FBDialogWindow->OSDRgn), FBDialogWindow->MultipleOSDSaveBox);
      TAP_MemFree (FBDialogWindow->MultipleOSDSaveBox);
      FBDialogWindow->MultipleOSDSaveBox = NULL;
    }
    FreeOSDRegion(FBDialogWindow->OSDRgn);   // doesn't wipe out
  }
  else
  {
    DialogWindowAlpha(0);
    TAP_Osd_FillBox (FBDialogWindow->OSDRgn, 0, 0, FBDialogWindow->OSDWidth, FBDialogWindow->OSDHeight, 0);
    TAP_Osd_SetTransparency (FBDialogWindow->OSDRgn, 255);
    TAP_Osd_Delete (FBDialogWindow->OSDRgn);
  }

  FBDialogWindow->OSDRgn = 0;

  FBDialogWindow->isVisible = FALSE;

  if (FBDialogWindow->isNormalMode) TAP_EnterNormal();
}
Exemplo n.º 6
0
void ReDrawAllLogosInPage( int pagenum )
{
	int countTvSvc = 0, countRadioSvc = 0;
	int svcCount = 0, i = 0, j = 0;
	char buffer2 [256];

//TAP_SPrint(buffer2, "ReDraw: %d %d",pageNumber, selectedLogo);
//DisplayMessageWindow(buffer2, "Press OK", "", &dummy);

	TAP_Osd_FillBox( rgn, 53, 70, 614, 420, FILL_COLOUR );				// Clear the main portion of the screen
	
	TAP_Channel_GetTotalNum( &countTvSvc, &countRadioSvc );
	if ( selectedSvc == 0 ) svcCount = countTvSvc; else svcCount = countRadioSvc;
	
	for ( i=(pagenum*MAX_CHANNELS_PER_PAGE); i<svcCount ; i++)										// for each channel (service)
	{
		if ( j >= MAX_CHANNELS_PER_PAGE )  break;
		j++;
	    	DisplayChannelLogo( i, selectedSvc );							// display the logo
//break;
	}
	
	DisplayChannelLogo( selectedLogo, selectedSvc );					// redraw the highlight (makes things a little tidier)
	DisplayChannelSelection();
}
Exemplo n.º 7
0
//------------
//
void DisplayLogo( word WindowRgn, dword Xcoord, dword Ycoord, int svcNum, byte svcType )
{
	char	str[80];
	dword	width;
	int		i;

	TYPE_logoArray	*localPtr;
	TYPE_TapChInfo	currentChInfo;

	if ( !TAP_Channel_GetInfo( svcType, svcNum, &currentChInfo ) ) return;		// service doesn't exist !
	
	if ( svcType == SVC_TYPE_Tv ) localPtr = &logoArrayTv[svcNum];		// recover the correct pointer - TV, or Radio
	else localPtr = &logoArrayRadio[svcNum];

	if ( localPtr->processedFlag == TRUE )								// is this logo in our cache?
	{																	// yes -> display it
		TAP_Osd_RestoreBox( WindowRgn, Xcoord, Ycoord, LOGO_W, LOGO_H, localPtr->logo );
	}
	else                                                                // no -> just print the channel's name
	{																	// in place of the logo
		TAP_Osd_FillBox( rgn, Xcoord, Ycoord, LOGO_W, LOGO_H, COLOR_Black );	// blank the background

		i=0;
		FormatNameString( localPtr->svcName, &i, str, LOGO_W - 5);		// print the 1st line
		TAP_Osd_PutStringAf1419( WindowRgn, Xcoord, Ycoord, Xcoord + LOGO_W + 5, str, COLOR_White, 0 );

		FormatNameString( localPtr->svcName, &i, str, LOGO_W - 5);		// print the 2nd line
		TAP_Osd_PutStringAf1419( WindowRgn, Xcoord, Ycoord + (LOGO_H/2), Xcoord + LOGO_W + 5, str, COLOR_White, 0 );
	}
}
Exemplo n.º 8
0
void InitialiseScreenConfigWindow(startWindow)
{
     screenConfigShowing = TRUE;
     window = startWindow;  // Set the global starting window.
     axis = 0; // Start with the Top/Bottom axis.

     // Need to turn off the Guide Window first so that we have the correct SCREEN_* settings.     
     if (guideWindowDisplayed)
	 {
		SwitchScreenToNormal();
        ShrinkPictureWindows();
        CloseGuideWindow();
		guideWindowDisplayed = FALSE;
     }

     // Save the current configuration.
     current_SCREEN_X = SCREEN_X;   
     current_SCREEN_Y = SCREEN_Y;   
     current_SCREEN_W = SCREEN_W;   
     current_SCREEN_H = SCREEN_H;   
     current_GDE_SCREEN_X = GDE_SCREEN_X;   
     current_GDE_SCREEN_Y = GDE_SCREEN_Y;   
     current_GDE_SCREEN_W = GDE_SCREEN_W;   
     current_GDE_SCREEN_H = GDE_SCREEN_H;   
     current_PIP_SCRX = PIP_SCRX;   
     current_PIP_SCRY = PIP_SCRY;   
     current_PIP_SCRW = PIP_SCRW;   
     current_PIP_SCRH = PIP_SCRH;     
     current_SCREEN_RATIO = SCREEN_RATIO;
     current_BASE_X   = BASE_X;
     current_BASE_Y   = BASE_Y;
     current_GDE_W    = GDE_W;
     current_EVENT_X  = EVENT_X;
     current_EVENT_Y  = EVENT_Y;
     current_EVENT_H  = EVENT_H;
     current_CLOCK_X  = CLOCK_X;
     current_CLOCK_Y  = CLOCK_Y;
     current_OVERSCAN_X = OVERSCAN_X;
     current_OVERSCAN_Y = OVERSCAN_Y;
     current_OVERSCAN_W = OVERSCAN_W;
     current_OVERSCAN_H = OVERSCAN_H;
     
//     TAP_Osd_FillBox( rgn, 0, 0, 720, 576, FILL_COLOUR );				// clear the screen
     TAP_Osd_FillBox( rgn, 0, 0, 720, 576, 0 );				// clear the screen

     TAP_Channel_Scale( CHANNEL_Main, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, FALSE );
	 TAP_Channel_Scale( CHANNEL_Sub, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, FALSE );			// define the PIP window
     
//     ActivateLogos( currentSvcType, currentSvcNum );                    // draw the logos	
//	 DisplayEventInfo( currentSvcType, currentSvcNum );                 // draw the event information window.

     UpdateClock( rgn, CLOCK_X, CLOCK_Y );  // Draw the clock.

     ActivateLogos( currentSvcType, currentSvcNum );                    // draw the logos	
     DisplayScreenConfigWindow(window);   
     ShowPictureWindows(window);
}
Exemplo n.º 9
0
//---------------------------------------------------------------
//
void DisplayChannelLogo( int svcNum, byte svcType )
{
	dword x_coord = 0, y_coord = 0;
	char buffer2 [256];

	x_coord = (((svcNum % MAX_CHANNELS_PER_PAGE) % NUM_LOGO_ON_X_AXIS) * LOGO_SPACE_X) + BASE_X;			// calculate x, and y coord for the logo
	y_coord = (((svcNum % MAX_CHANNELS_PER_PAGE) / NUM_LOGO_ON_X_AXIS) * LOGO_SPACE_Y) + BASE_Y;

//if (svcNum >=MAX_CHANNELS_PER_PAGE)
//{
//TAP_SPrint(buffer2, "%d %d",x_coord,y_coord);
//DisplayMessageWindow(buffer2, "Press OK", "", &dummy);
//}

	if ( svcNum == selectedLogo ) TAP_Osd_FillBox( rgn, x_coord-5, y_coord-5, 70, 49, COLOR_Yellow );	// highlight in yellow
	else TAP_Osd_FillBox( rgn, x_coord-5, y_coord-5, 70, 49, FILL_COLOUR );		// otherwise clear the space around the logo (remove any highlight)

	DisplayLogo( rgn, x_coord, y_coord, svcNum, svcType );						// draw the logo
}
Exemplo n.º 10
0
void DisplayChannelSelection( void )
{
	char str[256];
	TYPE_TapChInfo	chInfo;	
	
	TAP_Channel_GetInfo( selectedSvc, selectedLogo, &chInfo );
	TAP_SPrint( str, "%d -> %d: %d: %s", oldPageNumber, pageNumber, chInfo.logicalChNum, chInfo.chName );

	TAP_Osd_FillBox( rgn, 53, 490, 614, 86, FILL_COLOUR );				// clear the bottom portion
	TAP_Osd_PutStringAf1622( rgn, 58, 518, 610, str, INFO_COLOUR, FILL_COLOUR );
}
Exemplo n.º 11
0
void CloseConfigWindow(void)
{
	configWindowShowing = FALSE;
	if ((guideWindowDisplayed) && (GuideWindowOption == 1)) SwitchScreenToGuideWindow();
    else SwitchScreenToNormal();  
	
    if (CalledByTSRCommander)   // If the Config Window was called by TSR Commander, then we need to do some extra cleanup.
    {
       CalledByTSRCommander=FALSE;
	   TAP_Osd_FillBox( rgn, 0, 0, 720, 576, 0 );							// clear the screen.  Added for TSR Commander support.
	   TAP_EnterNormal();                                                  // Added for TSR Commander support.  Needed to return to normal.
    }

	
}
Exemplo n.º 12
0
void ReDrawAllLogos( void )
{
	int countTvSvc = 0, countRadioSvc = 0;
	int svcCount = 0, i = 0;

	TAP_Osd_FillBox( rgn, 53, 70, 614, 420, FILL_COLOUR );				// Clear the main portion of the screen
	
	TAP_Channel_GetTotalNum( &countTvSvc, &countRadioSvc );
	if ( selectedSvc == 0 ) svcCount = countTvSvc; else svcCount = countRadioSvc;
	
	for ( i=0; i<svcCount ; i++)										// for each channel (service)
	{
		if ( i >= MAX_CHANNELS_PER_PAGE) break;
	    DisplayChannelLogo( i, selectedSvc );							// display the logo
	}
	
	DisplayChannelLogo( selectedLogo, selectedSvc );					// redraw the highlight (makes things a little tidier)
	DisplayChannelSelection();
}
Exemplo n.º 13
0
//------------------
//
void DisplayMenuLine( menu_Struct *menu, int lineNumber )
{
    char	str[80];
	dword	width, x_coord, exTextX, exTextY;
	int 	i;
	int 	currentMenuLine;
    menuItem_Struct	*currentItem;

	currentMenuLine = menu->currentLine;

	if ( lineNumber > menu->count ) return;								// bounds check
	if ( lineNumber == 0 ) return;										// bounds check

	if ( currentMenuLine == lineNumber )								// highlight the current cursor line
	    TAP_Osd_PutGd( rgn, MENU_X, (lineNumber * MENU_STEP) + MENU_Y - 8, &_menurow_highlightGd, FALSE );
	else
	    TAP_Osd_PutGd( rgn, MENU_X, (lineNumber * MENU_STEP) + MENU_Y - 8, &_menurowGd, FALSE );


	currentItem = menu->items[ lineNumber ];
	strcpy( str, currentItem->title );

	width = TAP_Osd_GetW( str, 0, FNT_Size_1622 );

	if ( width <= MENU_ROW_W ) x_coord = MENU_X + ((MENU_ROW_W)/2) - (width/2);	// centralise text
	else x_coord = MENU_X;														// too wide - fill width
	
																				// print the text
	TAP_Osd_PutStringAf1622( rgn, x_coord, (lineNumber * MENU_STEP) + MENU_Y, (MENU_X + MENU_ROW_W), str, MAIN_TEXT_COLOUR, 0 );

	
	exTextX = MENU_X;
	exTextY = ((MAX_NUMBER_OF_MENU_ITEMS+1) * MENU_STEP) + MENU_Y;
	
	if ( lineNumber == currentMenuLine )
	{
		strcpy( str, currentItem->description );
																				// blank the extended text area before redrawing
		TAP_Osd_FillBox( rgn, exTextX, (exTextY-8), MENU_ROW_W, MENU_STEP, FILL_COLOUR );
		TAP_Osd_PutStringAf1419( rgn, exTextX, (exTextY+15), (exTextX + MENU_ROW_W), str, INFO_COLOUR, 0 );
	}
}
Exemplo n.º 14
0
void ShowMessageWin (char* lpMessage, char* lpMessage1)
{
	int rgn;							// stores rgn-handle for osd
	dword w;							// stores width of message-text

	rgn = TAP_Osd_Create( 0, 0, 720, 576, 0, FALSE );		// create rgn-handle
	w = TAP_Osd_GetW( lpMessage, 0, FNT_Size_1926 ) + 10;		// calculate width of message
	if (TAP_Osd_GetW( lpMessage1, 0, FNT_Size_1926 ) + 10>w)
	{
		w = TAP_Osd_GetW( lpMessage1, 0, FNT_Size_1926 ) + 10;	// calculate width of message
	}
	if (w > 720) w = 720;						// if message is to long
	TAP_Osd_FillBox(rgn, (720-w)/2-5, 265, w+10, 62, RGB(19,19,19) );	// draw background-box for border
	TAP_Osd_PutS(rgn, (720-w)/2, 270, (720+w)/2, lpMessage,		// show message
		RGB(31,31,31), RGB(3,5,10), 0, FNT_Size_1926, FALSE, ALIGN_CENTER);
	TAP_Osd_PutS(rgn, (720-w)/2, 270+26, (720+w)/2, lpMessage1,		// show message
		RGB(31,31,31), RGB(3,5,10), 0, FNT_Size_1926,FALSE, ALIGN_CENTER);
	TAP_Delay(200);							// show it for 2 seconds
	TAP_Osd_Delete(rgn);					// release rgn-handle
}
Exemplo n.º 15
0
// Function to render the guide item on the screen. Send it the required text
void MultiList_RenderChannel( word rgn, word svcId, int row, int col ){
	int x, y, w, h;
	dword fc = DISPLAY_EVENT;
	int svcNum, svcType;
 	TYPE_TapChInfo chInfo;
	char text[128];
	// Calculate the position to render the item
//	w = (720-((Panel_Left_X-DISPLAY_X_OFFSET)*2))/MultiList_Cols;	// [    ][    ][    ]
	w = DISPLAY_ROW_WIDTH/MultiList_Cols;	// [    ][    ][    ]
	x = Panel_Left_X + (w*col) + DISPLAY_GAP;	// Offset plus the coloumn
	h = 22;
	y = (Panel_Left_Y + (( h + DISPLAY_GAP) * (0)))+(((( h + DISPLAY_GAP) * (MultiList_MaxEvents))+( h + DISPLAY_GAP))*row);
	// Draw background for item it previous or selected otherwise the background on text will do the job
	TAP_Osd_FillBox(rgn, x-1, y, w-2, h, DISPLAY_MAIN);
	svcNum = GetSvcNum(svcId);
	svcType = GetSvcType(svcId);
	sprintf( text, "%d, %d, %s\0", svcNum, svcType, Channel_Name(svcNum,svcType));
	TAP_Channel_GetInfo( svcType, svcNum, &chInfo );
	TAP_Osd_PutStringAf1419( rgn, x+5, y+1, x+(w-10), chInfo.chName, fc, COLOR_None );
}
Exemplo n.º 16
0
// Function to render the guide item on the screen. Send it the required text
void MultiList_RenderItem( word rgn, char * text, int eventNum, int item, int row, int col, int selectedrow, int selectedcol, int prevselectedrow, int prevselectedcol, bool fresh ){
	int x, y, w, h;
	dword fc = DISPLAY_EVENT;
	dword bc = DISPLAY_ITEM;
	TYPE_TapEvent event;
	event = Events_GetEvent(eventNum);
	// Calculate the position to render the item
//	w = (720-((Panel_Left_X-DISPLAY_X_OFFSET)*2))/MultiList_Cols;	// [    ][    ][    ]
	w = DISPLAY_ROW_WIDTH/MultiList_Cols;	// [    ][    ][    ]
	x = Panel_Left_X + (w*col) + DISPLAY_GAP;	// Offset plus the coloumn
	h = 22;
	y = (Panel_Left_Y + (( h + DISPLAY_GAP) * (item-MultiList_Min))+( h + DISPLAY_GAP))+(((( h + DISPLAY_GAP) * (MultiList_MaxEvents))+( h + DISPLAY_GAP))*row);
	
	if( eventNum > -1 ){
		if( event.startTime <= Now(0) && event.endTime >= Now(0) ){ fc = DISPLAY_NOWEVENT; }
		if( event.endTime <= Now(0) ){ fc = DISPLAY_EVENTPAST; }
	}
	
	// Check for full or partial and render appropriatly
	switch( Timers_HasTimer( eventNum ) ){
		case TIMER_FULL:
			bc = DISPLAY_RECORDINGFULL;
			break;
		case TIMER_PARTIAL:
			bc = DISPLAY_RECORDINGPARTIAL;
	}
	// Check for full or partial and render appropriatly
	switch( Timers_IsRecordingEvent( eventNum ) ){
		case TIMER_FULL:
			bc = DISPLAY_RECORDINGFULL;
			break;
		case TIMER_PARTIAL:
			bc = DISPLAY_RECORDINGPARTIAL;
	}	
	
	// Draw background for item it previous or selected otherwise the background on text will do the job
	// TO DO ADD NAVIAGTION AND HIGHLIGHTING	

	TAP_Osd_FillBox(rgn, x-1, y, w-2, h, bc);
	TAP_Osd_PutStringAf1419( rgn, x+5, y+1, x+(w-10), text, fc, COLOR_None );
}
Exemplo n.º 17
0
//---------------------------------------  ShowMessageWin --------------------------------
//
void ShowMessageWin (char* lpMessage, char* lpMessage1, dword dwDelay)
{
	dword rgn;															// stores rgn-handle for osd
	dword w;															// stores width of message-text

	rgn = TAP_Osd_Create( 0, 0, 720, 576, 0, FALSE );					// create rgn-handle
	//rgn = TAP_Osd_Create( 0, 0, 720, 576, 0, OSD_Flag_Plane2 );					// create rgn-handle
	w = TAP_Osd_GetW( lpMessage, 0, FNT_Size_1926 ) + 10;				// calculate width of message
	if (TAP_Osd_GetW( lpMessage1, 0, FNT_Size_1926 ) + 10>w)
		w = TAP_Osd_GetW( lpMessage1, 0, FNT_Size_1926 ) + 10;			// if second message is larger, calculate new width of message
	
	if (w > 720) w = 720;												// if message is to long
	TAP_Osd_FillBox(rgn, (720-w)/2-5, 265, w+10, 62, RGB(19,19,19) );	// draw background-box for border
		
	TAP_Osd_PutS(rgn, (720-w)/2, 270, (720+w)/2, lpMessage,		
		RGB(31,31,31), RGB(3,5,10), 0, FNT_Size_1926,
		FALSE, ALIGN_CENTER);											// show 1. message
	TAP_Osd_PutS(rgn, (720-w)/2, 270+26, (720+w)/2, lpMessage1,	
		RGB(31,31,31), RGB(3,5,10), 0, FNT_Size_1926,
		FALSE, ALIGN_CENTER);											// show 2. message
	TAP_Delay(dwDelay);													// show it for dwDelay /100 seconds
	TAP_Osd_Delete(rgn);												// release rgn-handle
}
Exemplo n.º 18
0
void    ShowMessageBox( word msgRgn, char* msg1, char* msg2, char* msg3)
{
    word   width, msgY;
    int    msgScrWidth;
    
    msgScrWidth = MSG_SCREEN_W-10;
    msgY = MSG_SCREEN_Y+12;
      
    //  Calculate width of message window
    width = TAP_Osd_GetW( msg1, 0, FNT_Size_1926 );     
    if ( TAP_Osd_GetW( msg2, 0, FNT_Size_1622 ) + 10 > width ) width = TAP_Osd_GetW( msg2, 0, FNT_Size_1622 );
    if ( TAP_Osd_GetW( msg3, 0, FNT_Size_1622 ) + 10 > width ) width = TAP_Osd_GetW( msg3, 0, FNT_Size_1622 );

    if ( width > msgScrWidth ) width = msgScrWidth;

#ifdef WIN32  // If testing on WIN32 platform 
TAP_Osd_FillBox( msgRgn,MSG_SCREEN_X, MSG_SCREEN_Y, MSG_SCREEN_W, MSG_SCREEN_H, FILL_COLOUR );				// clear the screen
#endif          

    // Display the pop-up window.
    TAP_Osd_PutGd( msgRgn, MSG_SCREEN_X, MSG_SCREEN_Y, &_msgpopup360x130Gd, TRUE );

		
	TAP_Osd_PutS(msgRgn, MSG_SCREEN_X+(msgScrWidth-width)/2, msgY, MSG_SCREEN_X+(msgScrWidth+width)/2, msg1,		
		MSG_TITLE_COLOUR, 0, 0, FNT_Size_1926,
		FALSE, ALIGN_CENTER);											// show 1. message
		
	TAP_Osd_PutS(msgRgn, MSG_SCREEN_X+(msgScrWidth-width)/2, msgY+50, MSG_SCREEN_X+(msgScrWidth+width)/2, msg2,	
		MSG_TEXT_COLOUR, 0, 0, FNT_Size_1622,
		FALSE, ALIGN_CENTER);											// show 2. message

	TAP_Osd_PutS(msgRgn, MSG_SCREEN_X+(msgScrWidth-width)/2, msgY+80, MSG_SCREEN_X+(msgScrWidth+width)/2, msg3,	
		MSG_TEXT_COLOUR, 0, 0, FNT_Size_1622,
		FALSE, ALIGN_CENTER);											// show 3. message


}
Exemplo n.º 19
0
void ThreeOption_DrawBackground( word rgn ){
	if( ThreeOption_Base != NULL ) TAP_MemFree(ThreeOption_Base);
	ThreeOption_Base = TAP_Osd_SaveBox(ThreeOption_RGN, ThreeOption_X, ThreeOption_Y, ThreeOption_W, ThreeOption_H);	// Save what is under the Timer screen
	TAP_Osd_FillBox(rgn, ThreeOption_X, ThreeOption_Y, ThreeOption_W, ThreeOption_H, ThreeOption_BaseColour);
}
Exemplo n.º 20
0
void ThreeOption_DrawItem( word rgn, int item, int selected ){
	int fntSize = 0;
	int pad_y;
	dword fc = ThreeOption_Fc;
	dword bc = ThreeOption_Bc;
	// Work out the font size allowed for the height of the option
	if( ( ThreeOption_Option_H - 12 ) > 19  ){
		fntSize = FNT_Size_1622;
		pad_y = (ThreeOption_Option_H/2)-(22/2);
	} else {
		pad_y = (ThreeOption_Option_H/2)-(19/2);
	}
	// If selected change the colors of the elements
	if( item == selected ){
		fc = ThreeOption_HghFc;
		bc = ThreeOption_HghBc;
	}
	switch( item ){
		case THREEOPTION_QUESTION:
			TAP_Osd_FillBox(rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item), ThreeOption_Option_W, ThreeOption_Option_H, ThreeOption_BaseColour);
			WrapPutStr(rgn, ThreeOption_Question, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_Option_W, fc, COLOR_None, 4, fntSize, 2);
			break;
		case THREEOPTION_OPTION1:
			if( item == selected ){
				if( ThreeOption_ItemHigh != NULL ){
					TAP_Osd_RestoreBox( rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, ThreeOption_ItemHigh );
				} else {
					TAP_Osd_FillBox(rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, bc);
				}
			} else {
				if( ThreeOption_ItemBase != NULL ){
					TAP_Osd_RestoreBox( rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, ThreeOption_ItemBase );
				} else {
					TAP_Osd_FillBox(rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, bc);
				}
			}
			switch( fntSize ){
				case FNT_Size_1419:
					Font_Osd_PutString1419( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, ThreeOption_Option1, fc, COLOR_None);
					break;
				case FNT_Size_1622:
					Font_Osd_PutString1622( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, ThreeOption_Option1, fc, COLOR_None);
					break;
				case FNT_Size_1926:
					Font_Osd_PutString1926( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, ThreeOption_Option1, fc, COLOR_None);
					break;
			}
			break;
		case THREEOPTION_OPTION2:
			if( item == selected ){
				if( ThreeOption_ItemHigh != NULL ){
					TAP_Osd_RestoreBox( rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, ThreeOption_ItemHigh );
				} else {
					TAP_Osd_FillBox(rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, bc);
				}
			} else {
				if( ThreeOption_ItemBase != NULL ){
					TAP_Osd_RestoreBox( rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, ThreeOption_ItemBase );
				} else {
					TAP_Osd_FillBox(rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, bc);
				}
			}
			switch( fntSize ){
				case FNT_Size_1419:
					Font_Osd_PutString1419( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, ThreeOption_Option2, fc, COLOR_None);
					break;
				case FNT_Size_1622:
					Font_Osd_PutString1622( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, ThreeOption_Option2, fc, COLOR_None);
					break;
				case FNT_Size_1926:
					Font_Osd_PutString1926( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, ThreeOption_Option2, fc, COLOR_None);
					break;
			}
			break;
		case THREEOPTION_NO:
			if( item == selected ){
				if( ThreeOption_ItemHigh != NULL ){
					TAP_Osd_RestoreBox( rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, ThreeOption_ItemHigh );
				} else {
					TAP_Osd_FillBox(rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, bc);
				}
			} else {
				if( ThreeOption_ItemBase != NULL ){
					TAP_Osd_RestoreBox( rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, ThreeOption_ItemBase );
				} else {
					TAP_Osd_FillBox(rgn, ThreeOption_X+ThreeOption_PADDING, ThreeOption_Y+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)-ThreeOption_PADDING, ThreeOption_Option_W, ThreeOption_Option_H, bc);
				}
			}
			switch( fntSize ){
				case FNT_Size_1419:
					Font_Osd_PutString1419( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, "Cancel", fc, COLOR_None);
					break;
				case FNT_Size_1622:
					Font_Osd_PutString1622( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, "Cancel", fc, COLOR_None);
					break;
				case FNT_Size_1926:
					Font_Osd_PutString1926( rgn, ThreeOption_X+ThreeOption_PADDING+ThreeOption_GAP, ThreeOption_Y-ThreeOption_PADDING+ThreeOption_GAP+((ThreeOption_Option_H+ThreeOption_GAP)*item)+pad_y, ThreeOption_X+ThreeOption_PADDING+ThreeOption_Option_W-ThreeOption_GAP, "Cancel", fc, COLOR_None);
					break;
			}
			break;
	}
}
Exemplo n.º 21
0
void ShowPictureWindows( int window )
{
    switch (window)
    {
	     case 1: // Main Window.
                TAP_Osd_FillBox( rgn, SCREEN_X_MIN, SCREEN_Y_MIN, SCREEN_W_MAX, SCREEN_H_MAX, 0 ); // Clear the entire Main window area.
                TAP_Channel_Scale( CHANNEL_Main, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, FALSE );
                if (guideWindowDisplayed) DisplayGuideWindow( currentSvcType, currentSvcNum );
                UpdateClock( rgn, CLOCK_X, CLOCK_Y );  // Draw the clock.
                TAP_Osd_DrawRectangle( rgn, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, BASE_X-10, BASE_Y-HEADER_H, LOGO_WINDOW_W-BASE_X+10, LOGO_WINDOW_H-BASE_Y+HEADER_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_X-1, GDE_Y, GDE_W, GDE_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, EVENT_X, EVENT_Y, EVENT_W, EVENT_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, CLOCK_X-CLOCK_W, CLOCK_Y, CLOCK_W, CLOCK_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_SCREEN_X, GDE_SCREEN_Y, GDE_SCREEN_W, GDE_SCREEN_H, 2, COLOR_Yellow );
                TAP_Osd_DrawRectangle( rgn, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, 2, COLOR_Red );
                break;
                
	     case 2: // PiP Window.
                TAP_Osd_FillBox( rgn, 0, PIP_SCRY-1, PIP_X_MAX, OSD_MAX_Y-(PIP_SCRY-1), 0 ); // Clear the entire PIP window area.
	            TAP_Channel_Scale( CHANNEL_Sub, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, FALSE );			// define the PIP window
                UpdateClock( rgn, CLOCK_X, CLOCK_Y );  // Draw the clock.
                TAP_Osd_DrawRectangle( rgn, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, 2, COLOR_Yellow );
                TAP_Osd_DrawRectangle( rgn, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, 2, COLOR_Red );	
                TAP_Osd_DrawRectangle( rgn, BASE_X-10, BASE_Y-HEADER_H, LOGO_WINDOW_W-BASE_X+10, LOGO_WINDOW_H-BASE_Y+HEADER_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_X-1, GDE_Y, GDE_W, GDE_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, EVENT_X, EVENT_Y, EVENT_W, EVENT_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, CLOCK_X-CLOCK_W, CLOCK_Y, CLOCK_W, CLOCK_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_SCREEN_X, GDE_SCREEN_Y, GDE_SCREEN_W, GDE_SCREEN_H, 2, COLOR_Yellow );
                break;

	     case 3: // Logo Window.
                TAP_Osd_FillBox( rgn, SCREEN_X_MIN, SCREEN_Y_MIN, SCREEN_W_MAX, SCREEN_H_MAX, 0 ); // Clear the entire Main window area.
                ActivateLogos( currentSvcType, currentSvcNum );                    // draw the logos	
                if (guideWindowDisplayed) 
                {
                    CloseGuideWindow();    // Close current Guide window
                    ActivateGuideWindow(); // Reactivate with new coordinates.
                    DisplayGuideWindow( currentSvcType, currentSvcNum );
                }
                UpdateClock( rgn, CLOCK_X, CLOCK_Y );  // Draw the clock.
                TAP_Osd_DrawRectangle( rgn, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, 2, COLOR_Yellow );
                TAP_Osd_DrawRectangle( rgn, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, BASE_X-10, BASE_Y-HEADER_H, LOGO_WINDOW_W-BASE_X+10, LOGO_WINDOW_H-BASE_Y+HEADER_H, 2, COLOR_Red );	
                TAP_Osd_DrawRectangle( rgn, BASE_X-10, LOGO_WINDOW_H, LOGO_WINDOW_W-BASE_X+10, 2, 1, COLOR_Black );	
                TAP_Osd_DrawRectangle( rgn, GDE_X-1, GDE_Y, GDE_W, GDE_H, 2, COLOR_Red );	
                TAP_Osd_DrawRectangle( rgn, EVENT_X, EVENT_Y, EVENT_W, EVENT_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, CLOCK_X-CLOCK_W, CLOCK_Y, CLOCK_W, CLOCK_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_SCREEN_X, GDE_SCREEN_Y, GDE_SCREEN_W, GDE_SCREEN_H, 2, COLOR_Yellow );
                break;

	     case 4: // Event Info Window
                DisplayScreenConfigWindow(window);   // Redraw Event Window with new coordinates.
                UpdateClock( rgn, CLOCK_X, CLOCK_Y );  // Draw the clock.
                TAP_Osd_DrawRectangle( rgn, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, 2, COLOR_Yellow );
                TAP_Osd_DrawRectangle( rgn, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, BASE_X-10, BASE_Y-HEADER_H, LOGO_WINDOW_W-BASE_X+10, LOGO_WINDOW_H-BASE_Y+HEADER_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_X-1, GDE_Y, GDE_W, GDE_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, EVENT_X, EVENT_Y, EVENT_W, EVENT_H, 2, COLOR_Red );	
                TAP_Osd_DrawRectangle( rgn, CLOCK_X-CLOCK_W, CLOCK_Y, CLOCK_W, CLOCK_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_SCREEN_X, GDE_SCREEN_Y, GDE_SCREEN_W, GDE_SCREEN_H, 2, COLOR_Yellow );
                break;

	     case 5:  // Clock Window
                UpdateClock( rgn, CLOCK_X, CLOCK_Y );  // Draw the clock.
                TAP_Osd_DrawRectangle( rgn, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, 2, COLOR_Yellow );
                TAP_Osd_DrawRectangle( rgn, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, BASE_X-10, BASE_Y-HEADER_H, LOGO_WINDOW_W-BASE_X+10, LOGO_WINDOW_H-BASE_Y+HEADER_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_X-1, GDE_Y, GDE_W, GDE_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, EVENT_X, EVENT_Y, EVENT_W, EVENT_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, CLOCK_X-CLOCK_W, CLOCK_Y, CLOCK_W, CLOCK_H, 2, COLOR_Red );	
                TAP_Osd_DrawRectangle( rgn, GDE_SCREEN_X, GDE_SCREEN_Y, GDE_SCREEN_W, GDE_SCREEN_H, 2, COLOR_Yellow );
                break;

	     case 6: // Main Window with Guide Window Active
                TAP_Osd_FillBox( rgn, LOGO_WINDOW_W+GDE_W, 0, OSD_MAX_X-(LOGO_WINDOW_W+GDE_W), EVENT_Y-1, 0 ); // Clear the entire Main window area.
                TAP_Channel_Scale( CHANNEL_Main, GDE_SCREEN_X, GDE_SCREEN_Y, GDE_SCREEN_W, GDE_SCREEN_H, FALSE );
                if (guideWindowDisplayed) DisplayGuideWindow( currentSvcType, currentSvcNum );
                UpdateClock( rgn, CLOCK_X, CLOCK_Y );  // Draw the clock.
                TAP_Osd_DrawRectangle( rgn, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, BASE_X-10, BASE_Y-HEADER_H, LOGO_WINDOW_W-BASE_X+10, LOGO_WINDOW_H-BASE_Y+HEADER_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_X-1, GDE_Y, GDE_W, GDE_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, EVENT_X, EVENT_Y, EVENT_W, EVENT_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, CLOCK_X-CLOCK_W, CLOCK_Y, CLOCK_W, CLOCK_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, 2, COLOR_Yellow );
                TAP_Osd_DrawRectangle( rgn, GDE_SCREEN_X, GDE_SCREEN_Y, GDE_SCREEN_W, GDE_SCREEN_H, 2, COLOR_Red );
                break;

	     case OVERSCAN_WINDOW: // Overscan window
                SetOverScanSizes();

                TAP_Osd_FillBox( rgn, 0, 0, OSD_MAX_X, OSD_MAX_Y, 0 ); // Clear the entire  window area.
                ActivateLogos( currentSvcType, currentSvcNum );                    // draw the logos	
                DisplayScreenConfigWindow(window);   // Redraw Event Window with new coordinates.
                TAP_Channel_Scale( CHANNEL_Main, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, FALSE );
	            TAP_Channel_Scale( CHANNEL_Sub, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, FALSE );			// define the PIP window
                if (guideWindowDisplayed) DisplayGuideWindow( currentSvcType, currentSvcNum );
                UpdateClock( rgn, CLOCK_X, CLOCK_Y );  // Draw the clock.
                TAP_Osd_DrawRectangle( rgn, PIP_SCRX, PIP_SCRY, PIP_SCRW, PIP_SCRH, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, BASE_X-10, BASE_Y-HEADER_H, LOGO_WINDOW_W-BASE_X+10, LOGO_WINDOW_H-BASE_Y+HEADER_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, GDE_X-1, GDE_Y, GDE_W, GDE_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, EVENT_X, EVENT_Y, EVENT_W, EVENT_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, CLOCK_X-CLOCK_W, CLOCK_Y, CLOCK_W, CLOCK_H, 2, COLOR_Yellow );	
                TAP_Osd_DrawRectangle( rgn, SCREEN_X, SCREEN_Y, SCREEN_W, SCREEN_H, 2, COLOR_Yellow );
                TAP_Osd_DrawRectangle( rgn, GDE_SCREEN_X, GDE_SCREEN_Y, GDE_SCREEN_W, GDE_SCREEN_H, 2, COLOR_Yellow );
                TAP_Osd_DrawRectangle( rgn, OVERSCAN_X, OVERSCAN_Y, OVERSCAN_W, OVERSCAN_H, 2, COLOR_Red );
                break;
    }
}
Exemplo n.º 22
0
void Rect::Fill(word regionIndex, word color) const
{
	TAP_Osd_FillBox(regionIndex, x, y, w, h, color);
}
Exemplo n.º 23
0
dword TAP_EventHandler( word event, dword param1, dword param2 )
{
	static int count = 0, err1, filelen;
	static byte flip = 0;
	int i, y;
	const int LINE_H = 21;
	const int STR_COUNT = 21;
	dword t1, t2;
	char strings[21][40] = {
		{"Test ajJsjjOjsj"},
		{"qUIck tESt"},
		{"ma"},
		{"keяд"},
		{"<< Nelonen >>"} ,
		{"03:20 "},
		{" leading SPACE"},
		{"Test ajJsjjOjsj"},
		{"qUIck tESt"},
		{"ma"},
		{"ke"},
		{"<< Nelonen >>"} ,
		{"03:20 "},
		{" leading SPACE"},
		{"Test ajJsjjOjsj"},
		{"qUIck tESt"},
		{"ma"},
		{"ke"},
		{"<< Nelonen >>"} ,
		{"03:20 "},
		{" leading SPACE"}
	};
	char msg[64];


	if( event == EVT_KEY )
	{
		if ( param1 == RKEY_Exit)
		{
			TAP_Osd_SetTransparency(rgn, 0xFF - transparency_orig);

			Delete_Font(&font0);
			Delete_Font(&font1);
			Delete_Font(&font2);

			TAP_Osd_Delete( rgn );

#ifdef DLALLOC
			dlmalloc_exit();
#endif

			TAP_EnterNormal();
			TAP_Exit();
			return 0;
		}
		if ( param1 == RKEY_1)
		{
			TAP_ExitNormal();
			TAP_Osd_FillBox(rgn, 30, 10, 620, 500, COLOR_DarkBlue);

			t1 = TAP_GetTick();
			y = 20;
			for (i = 0; i < STR_COUNT; i++, y+=LINE_H)
			{
				TAP_Osd_PutS_Font(rgn, 50, y,  199, strings[i], COLOR_Red, COLOR_White, &font0, ALIGN_LEFT);
				TAP_Osd_PutS_Font(rgn, 200, y, 349, strings[i], COLOR_Red, COLOR_White, &font1, ALIGN_LEFT);
				TAP_Osd_PutS_Font(rgn, 350, y, 499, strings[i], COLOR_Red, COLOR_White, &font2, ALIGN_LEFT);
			}
			t2 = TAP_GetTick() - t1;

			TAP_SPrint(msg, "Ticks: %d", t2);
			TAP_Osd_PutS(rgn, 500, 500, 650, msg, COLOR_Green, COLOR_Black, 0, FNT_Size_1419, 0, ALIGN_LEFT);

			return 0;
		}
		if ( param1 == RKEY_2)
		{
			TAP_ExitNormal();
			TAP_Osd_FillBox(rgn, 30, 10, 620, 500, COLOR_DarkBlue);

			t1 = TAP_GetTick();
			y = 20;
			for (i = 0; i < STR_COUNT; i++, y+=LINE_H)
			{
				TAP_Osd_PutS_FontL(rgn, 50, y,  199, strings[i], &font0, ALIGN_LEFT);
				TAP_Osd_PutS_FontL(rgn, 200, y, 349, strings[i], &font1, ALIGN_LEFT);
				TAP_Osd_PutS_FontL(rgn, 350, y, 499, strings[i], &font2, ALIGN_LEFT);
			}
			t2 = TAP_GetTick() - t1;

			TAP_SPrint(msg, "Ticks: %d", t2);
			TAP_Osd_PutS(rgn, 500, 500, 650, msg, COLOR_Green, COLOR_Black, 0, FNT_Size_1419, 0, ALIGN_LEFT);

			return 0;
		}
		if ( param1 == RKEY_3)
		{
			TAP_ExitNormal();
			TAP_Osd_FillBox(rgn, 30, 10, 620, 500, COLOR_DarkBlue);

			t1 = TAP_GetTick();
			y = 20;
			for (i = 0; i < STR_COUNT; i++, y+=LINE_H)
			{
				TAP_Osd_PutS_FontEx(rgn, 50, y,  199, 19, 2, strings[i], COLOR_Red, COLOR_White, &font0, ALIGN_LEFT);
				TAP_Osd_PutS_FontEx(rgn, 200, y, 349, 19, 2, strings[i], COLOR_Red, COLOR_White, &font1, ALIGN_LEFT);
				TAP_Osd_PutS_FontEx(rgn, 350, y, 499, 19, 2, strings[i], COLOR_Red, COLOR_White, &font2, ALIGN_LEFT);
			}
			t2 = TAP_GetTick() - t1;

			TAP_SPrint(msg, "Ticks: %d", t2);
			TAP_Osd_PutS(rgn, 500, 500, 650, msg, COLOR_Green, COLOR_Black, 0, FNT_Size_1419, 0, ALIGN_LEFT);

			return 0;
		}
		if ( param1 == RKEY_4)
		{
			TAP_ExitNormal();
			TAP_Osd_FillBox(rgn, 30, 10, 620, 500, COLOR_DarkBlue);

			t1 = TAP_GetTick();
			y = 20;
			for (i = 0; i < STR_COUNT; i++, y+=LINE_H)
			{
				TAP_Osd_PutS(rgn, 50, y,  199, strings[i], COLOR_Red, COLOR_White, 0, FNT_Size_1419, 0, ALIGN_LEFT);
				TAP_Osd_PutS(rgn, 200, y, 349, strings[i], COLOR_Red, COLOR_White, 0, FNT_Size_1419, 0, ALIGN_LEFT);
				TAP_Osd_PutS(rgn, 350, y, 499, strings[i], COLOR_Red, COLOR_White, 0, FNT_Size_1419, 0, ALIGN_LEFT);
			}
			t2 = TAP_GetTick() - t1;

			TAP_SPrint(msg, "Ticks: %d", t2);
			TAP_Osd_PutS(rgn, 500, 500, 650, msg, COLOR_Green, COLOR_Black, 0, FNT_Size_1419, 0, ALIGN_LEFT);

			return 0;
		}
	}
	return param1;//event;
}
Exemplo n.º 24
0
void GuideSortOrder_DrawItem( word rgn, int item, int selected ){
	int fntSize = 0;
	int pad_y;
	dword fc = GuideSortOrder_Fc;
	dword bc = GuideSortOrder_Bc;
	// Work out the font size allowed for the height of the option
	if( ( GuideSortOrder_Option_H - 12 ) > 19  ){
//		if( ( GuideSortOrder_Option_H - 12 ) > 22 ){
//			// Use the big font
//			fntSize = FNT_Size_1926;
//			pad_y = (GuideSortOrder_Option_H/2)-(26/2);
//		} else {
			fntSize = FNT_Size_1622;
			pad_y = (GuideSortOrder_Option_H/2)-(22/2);
//		}
	} else {
		pad_y = (GuideSortOrder_Option_H/2)-(19/2);
	}
	// If selected change the colors of the elements
	if( item == selected ){
		fc = GuideSortOrder_HghFc;
		bc = GuideSortOrder_HghBc;
	}
	switch( item ){
		case GUIDE_SORTTITLE:
			TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item), GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_BaseColour);
			WrapPutStr(rgn, GuideSortOrder_Question, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_Option_W, fc, COLOR_None, 4, fntSize, 2);
			break;
		case GUIDE_SORTNAME:
			if( item == selected ){
				if( GuideSortOrder_ItemHigh != NULL ){
					TAP_Osd_RestoreBox( rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_ItemHigh );
				} else {
					TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
				}
			} else {
				if( GuideSortOrder_ItemBase != NULL ){
					TAP_Osd_RestoreBox( rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_ItemBase );
				} else {
					TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
				}
			}
//			TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
			switch( fntSize ){
				case FNT_Size_1419:
					Font_Osd_PutString1419( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Name", fc, COLOR_None);
					break;
				case FNT_Size_1622:
					Font_Osd_PutString1622( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Name", fc, COLOR_None);
					break;
				case FNT_Size_1926:
					Font_Osd_PutString1926( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Name", fc, COLOR_None);
					break;
			}
			break;
		case GUIDE_SORTCHANNEL:
			if( item == selected ){
				if( GuideSortOrder_ItemHigh != NULL ){
					TAP_Osd_RestoreBox( rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_ItemHigh );
				} else {
					TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
				}
			} else {
				if( GuideSortOrder_ItemBase != NULL ){
					TAP_Osd_RestoreBox( rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_ItemBase );
				} else {
					TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
				}
			}
//			TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
			switch( fntSize ){
				case FNT_Size_1419:
					Font_Osd_PutString1419( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Channel", fc, COLOR_None);
					break;
				case FNT_Size_1622:
					Font_Osd_PutString1622( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Channel", fc, COLOR_None);
					break;
				case FNT_Size_1926:
					Font_Osd_PutString1926( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Channel", fc, COLOR_None);
					break;
			}
			break;
		case GUIDE_SORTSTART:
			if( item == selected ){
				if( GuideSortOrder_ItemHigh != NULL ){
					TAP_Osd_RestoreBox( rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_ItemHigh );
				} else {
					TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
				}
			} else {
				if( GuideSortOrder_ItemBase != NULL ){
					TAP_Osd_RestoreBox( rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_ItemBase );
				} else {
					TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
				}
			}
//			TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
			switch( fntSize ){
				case FNT_Size_1419:
					Font_Osd_PutString1419( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Start", fc, COLOR_None);
					break;
				case FNT_Size_1622:
					Font_Osd_PutString1622( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Start", fc, COLOR_None);
					break;
				case FNT_Size_1926:
					Font_Osd_PutString1926( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Start", fc, COLOR_None);
					break;
			}
			break;
		case GUIDE_SORTRATING:
			if( item == selected ){
				if( GuideSortOrder_ItemHigh != NULL ){
					TAP_Osd_RestoreBox( rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_ItemHigh );
				} else {
					TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
				}
			} else {
				if( GuideSortOrder_ItemBase != NULL ){
					TAP_Osd_RestoreBox( rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, GuideSortOrder_ItemBase );
				} else {
					TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
				}
			}
//			TAP_Osd_FillBox(rgn, GuideSortOrder_X+GuideSortOrder_PADDING, GuideSortOrder_Y+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)-GuideSortOrder_PADDING, GuideSortOrder_Option_W, GuideSortOrder_Option_H, bc);
			switch( fntSize ){
				case FNT_Size_1419:
					Font_Osd_PutString1419( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Rating", fc, COLOR_None);
					break;
				case FNT_Size_1622:
					Font_Osd_PutString1622( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Rating", fc, COLOR_None);
					break;
				case FNT_Size_1926:
					Font_Osd_PutString1926( rgn, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_GAP, GuideSortOrder_Y-GuideSortOrder_PADDING+GuideSortOrder_GAP+((GuideSortOrder_Option_H+GuideSortOrder_GAP)*item)+pad_y, GuideSortOrder_X+GuideSortOrder_PADDING+GuideSortOrder_Option_W-GuideSortOrder_GAP, "Rating", fc, COLOR_None);
					break;
			}
			break;
	}
}
Exemplo n.º 25
0
void GuideSortOrder_DrawBackground( word rgn ){
	if( GuideSortOrder_Base != NULL ) TAP_MemFree(GuideSortOrder_Base);
	GuideSortOrder_Base = TAP_Osd_SaveBox(GuideSortOrder_RGN, GuideSortOrder_X, GuideSortOrder_Y, GuideSortOrder_W, GuideSortOrder_H);	// Save what is under the Timer screen
	TAP_Osd_FillBox(rgn, GuideSortOrder_X, GuideSortOrder_Y, GuideSortOrder_W, GuideSortOrder_H, GuideSortOrder_BaseColour);
}
Exemplo n.º 26
0
void DisplayScreenConfigWindow(int window)
{
    dword startX;
    char str[10];

	TAP_Osd_FillBox( rgn, EVENT_X-1, EVENT_Y-1, OSD_MAX_X-EVENT_X+1, OSD_MAX_Y-EVENT_Y+1, 0 );	// clear the bottom portion of the screen
	TAP_Osd_PutGd( rgn, EVENT_X, EVENT_Y, &_narrowhighlightGd, TRUE );	// draw the green bar
    startX = EVENT_X+3;   // Set the initial x-coord for the Event Name.

    //
    // Clear the Event Information box.
    // 
	TAP_Osd_FillBox( rgn, EVENT_X, EVENT_Y+35, EVENT_W, EVENT_H-35, EVENT_FILL_COLOUR );	// Fill the event window

    if (window != OVERSCAN_WINDOW) TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+40, MAX_X, "OK - Switches to other windows.", MAIN_TEXT_COLOUR, 0 );
    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+62, MAX_X, "Record - Saves window positions.", MAIN_TEXT_COLOUR, 0 );
    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+84, MAX_X, "Exit - Quits without saving positions.", MAIN_TEXT_COLOUR, 0 );
    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+106, MAX_X, "Recall - Reset to starting positions.", MAIN_TEXT_COLOUR, 0 );
    if (window != OVERSCAN_WINDOW) TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+128, MAX_X, "<< / >> - Decrease/Increase Size.", MAIN_TEXT_COLOUR, 0 );
    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+150, MAX_X, "Vol -/+  - Move Window Left/Right.", MAIN_TEXT_COLOUR, 0 );
    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+172, MAX_X, "Ch -/+  - Move Window Down/Up.", MAIN_TEXT_COLOUR, 0 );
    if (window == OVERSCAN_WINDOW) 
    {
       switch (axis)
       {
            case 0: // Top/Bottom
                    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+40, MAX_X, "OK - Switches to Left/Right setting.", MAIN_TEXT_COLOUR, 0 );
                    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+128, MAX_X, "<< / >> - Decrease/Increase Top/Bottom Size.", MAIN_TEXT_COLOUR, 0 );
                    break;
                    
            case 1: // Left/Right
                    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+40, MAX_X, "OK - Switches to Top/Bottom setting.", MAIN_TEXT_COLOUR, 0 );
                    TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+128, MAX_X, "<< / >> - Decrease/Increase Left/Right Size.", MAIN_TEXT_COLOUR, 0 );
                    break;
       }             
    }
       
    switch (window)
    {
           case 1:    
                      strcpy( str, "Main");
                      break;
           case 2:    
                      strcpy( str, "PiP");
                      break;
           case 3:    
                      strcpy( str, "Logo");
                      break;
           case 4:    
                      strcpy( str, "Event");
                      break;
           case 5:    
                      strcpy( str, "Clock");
                      break;
           case 6:    
                      strcpy( str, "Main/Guide");
                      break;
           case OVERSCAN_WINDOW:    
                      strcpy( str, "Quick");
                      break;
    }
    sprintf(gstr,"%s Window Size & Position Settings.",str);
	TAP_Osd_PutStringAf1622( rgn, startX, EVENT_Y+7, MAX_X, gstr, MAIN_TEXT_COLOUR, 0 );
    
}
Exemplo n.º 27
0
//--------------
//
void DisplayConfigLine(char lineNumber)
{
    char	str[80], str2[80];
	char	*text;
	int     optionNumber, page;


	if (( lineNumber < 1 ) || ( lineNumber > CONFIG_LINES )) return;		// bound check

    optionNumber = lineNumber;
    page = ((optionNumber-1)/LINES_PER_PAGE)+1;
    lineNumber = lineNumber % LINES_PER_PAGE;
    if (lineNumber == 0) lineNumber = 10;  // Put the Save/Cancel options always on line 10.	

	if (( chosenConfigLine == optionNumber ) && ( optionNumber != 10 ))		// highlight the current cursor line
    {																	// save, cancel, delete looks after itself
		TAP_Osd_PutGd( rgn, 53, lineNumber*CONFIG_Y_STEP+CONFIG_Y_OFFSET-8, &_highlightGd, FALSE );
	}
	else
	{
		TAP_Osd_PutGd( rgn, 53, lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET - 8, &_rowaGd, FALSE );
	}
	TAP_SPrint(str,"%d.",optionNumber);
	TAP_Osd_PutStringAf1622(rgn, 75, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), 700, str, MAIN_TEXT_COLOUR, 0 );
	

	switch ( optionNumber )
	{
		case 1 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Model Type", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );


				if ( currentModelType == TF5800 ) TAP_SPrint(str,"TF5800  (UK)");
				else TAP_SPrint(str,"TF5000  (International)");
				
				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;


		case 2 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Language", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				TAP_SPrint(str, "English");
				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, COLOR_DarkGray, 0 );
			    break;

				
		case 3 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1,  "Activation Key", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( keyStage )
				{
				    case 0 : 	text = GetButtonText( &localKeyCodes, CurrentActivationKey );
								strcpy( str, text );
								break;
								
					case 1 : 	TAP_SPrint( str, "Press new key now" );
								break;

					case 2 : 	TAP_SPrint( str, "Invalid choice" );
						    	break;

					default : 	TAP_SPrint( str, "eh?" );
								break;
				}
				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
			    break;


		case 4 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Highlight", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );


				TAP_SPrint(str,"%d", currentHighlight );
				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

				
		case 5 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Selection Style", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( displayOption )
				{
				    case 0 : 	TAP_SPrint( str, "Carousel" );
								break;
								
					case 1 : 	TAP_SPrint( str, "Linear" );
								break;

					default : 	TAP_SPrint( str, "BAD" );
								break;
				}
				
				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

		case 6 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Now/Next Tag", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentNowNextTag )
				{
				    case 0 : 	TAP_SPrint( str, "Off" );
								break;
								
					case 1 : 	TAP_SPrint( str, "On" );
								break;

					default : 	TAP_SPrint( str, "BAD" );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

				
				
		case 7 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Progress Info", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentProgressInfo )
				{
				    case 0 : 	TAP_SPrint( str, "Off" );
								break;
								
					case 1 : 	TAP_SPrint( str, "Text" );
								break;

					default : 	TAP_SPrint( str, "BAD" );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

				
				
		case 8 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Recall/PiP-Swap Key", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentRecallKey )
				{
				    case 0 : 	TAP_SPrint( str, "First Channel" );
								break;
								
					case 1 : 	TAP_SPrint( str, "Swap Channels" );
								break;

					default : 	TAP_SPrint( str, "BAD" );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

				
				
		case 9 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Screen Fading", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentScreenFade)
				{
				    case 0 : 	TAP_SPrint( str, "Off - no screen fading" );
								break;
								
					case 1 : 	TAP_SPrint( str, "Manual - use Blue key" );
								break;

					default : 	TAP_SPrint( str, "Automatic after %d seconds", currentScreenFade  );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

				
		case 11 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Start Channel", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentStartChannel)
				{
				    case 0 : 	TAP_SPrint( str, "Channel Last Highlighted" );
								break;
								
					case 1 : 	TAP_SPrint( str, "Current Channel" );
								break;

					default : 	TAP_SPrint( str, "BAD"  );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

		case 12 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Timer Start Offset", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentStartOffset)
				{
				    default : 	TAP_SPrint( str, "%d minutes",currentStartOffset );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

		case 13 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Timer End Offset", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentEndOffset)
				{
				    default : 	TAP_SPrint( str, "%d minutes",currentEndOffset );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;


		case 14 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Guide At Startup", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentGuideStart )
				{
				    case 0 : 	TAP_SPrint( str, "Start hidden" );
								break;
								
					case 1 : 	TAP_SPrint( str, "Start displayed" );
								break;

					case 2 : 	TAP_SPrint( str, "Start as it was when last exited" );
								break;

					default : 	TAP_SPrint( str, "BAD"  );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

				
				
		case 15 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "TV Screen Ratio", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentTvRatio)
				{
				    case 0 : 	TAP_SPrint( str, "4:3 Standard" );
								break;
								
					case 1 : 	TAP_SPrint( str, "16:9 Widescreen" );
								break;

					default : 	TAP_SPrint( str, "BAD"  );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

				
				
		case 16 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1, "Main/Guide window", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				switch ( currentGuideWindowOption)
				{
				    case 0 : 	TAP_SPrint( str, "Normal size" );
								break;
								
					case 1 : 	TAP_SPrint( str, "Shrink to fit" );
								break;

					default : 	TAP_SPrint( str, "BAD"  );
								break;
				}

				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
				break;

				
		case 17 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1,  "Progress Bars", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );
				switch ( currentProgressBarOption )
				{
				    case 0 : 	TAP_SPrint( str, "Multi Coloured" );
								break;
								
					case 1 : 	sprintf( str, "Single colour, %% filled" );
						    	break;

					case 2 : 	TAP_SPrint( str, "Single colour, all filled" );
								break;

					case 3 : 	sprintf( str, "White colour, %% filled" );
								break;

					default : 	TAP_SPrint( str, "[Invalid value]" );
								break;
				}
				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
			    break;
				
		case 18 :
				PrintCenter(rgn, CONFIG_E0, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E1,  "Channel Numbers", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );
				switch ( currentChannelNumberOption )
				{
				    case 0 : 	TAP_SPrint( str, "LCN" );
								break;
								
					case 1 : 	sprintf( str, "Topfield" );
						    	break;

					default : 	TAP_SPrint( str, "[Invalid value]" );
								break;
				}
				TAP_Osd_PutStringAf1622(rgn, CONFIG_X2, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), CONFIG_E2, str, MAIN_TEXT_COLOUR, 0 );
			    break;	

		case 10 :		
		case 20 :
				TAP_Osd_PutGd( rgn, 53, lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET - 8, &_rowaGd, FALSE );		// No highlight for us
	            TAP_SPrint(str,"%d.",optionNumber);
                TAP_Osd_PutStringAf1622(rgn, 75, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), 700, str, MAIN_TEXT_COLOUR, 0 );

				if (( configOption == 0 ) && ( chosenConfigLine%10 == 0 ))
				{
					TAP_Osd_PutGd( rgn, 116, lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET - 8, &_smallgreenbarGd, FALSE );
				    PrintCenter(rgn, 144, lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET, 244, "Save", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );
				}
				else PrintCenter(rgn, 144, lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET, 244, "Save", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

				if (( configOption == 1 ) && ( chosenConfigLine%10 == 0 ))
				{
					TAP_Osd_PutGd( rgn, 278, lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET - 8, &_smallgreenbarGd, FALSE );
					PrintCenter(rgn, 306, lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET, 406, "Cancel", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );
				}
				else PrintCenter(rgn, 306, lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET, 406, "Cancel", MAIN_TEXT_COLOUR, 0, FNT_Size_1622 );

			    TAP_Osd_FillBox( rgn, 437, lineNumber*CONFIG_Y_STEP+CONFIG_Y_OFFSET-8, 3, CONFIG_Y_STEP, FILL_COLOUR );		// one extra column seperator for us
			    
	            TAP_SPrint(str,"Page %d of %d",page,TOTAL_PAGES);
	            TAP_Osd_PutStringAf1622(rgn, 470, (lineNumber * CONFIG_Y_STEP + CONFIG_Y_OFFSET), 700, str, MAIN_TEXT_COLOUR, 0 );
			    
				break;


		default :
			break;
	}


    TAP_Osd_FillBox( rgn, CONFIG_E0, lineNumber*CONFIG_Y_STEP+CONFIG_Y_OFFSET-8, 3, CONFIG_Y_STEP, FILL_COLOUR );		// draw the column seperators
    TAP_Osd_FillBox( rgn, CONFIG_E1, lineNumber*CONFIG_Y_STEP+CONFIG_Y_OFFSET-8, 3, CONFIG_Y_STEP, FILL_COLOUR );

}
Exemplo n.º 28
0
void OSDDrawList(void)
{
    TRACEENTER();

    int                   i;
    dword                 XStart, XEnd, Y;
    tMenu                *pMenu;
    tItem                *pItem;
    dword                 ItemColor;
    char                  s[4];
    dword                 MaxNameIconWidth, MaxValueIconWidth;

    pMenu = &Menu[CurrentMenuLevel];

    //Get maximum width of icons
    MaxNameIconWidth = 0;
    MaxValueIconWidth = 0;
    for(i = 0; i < pMenu->NrItems; i++)
    {
        if(pMenu->Item[i].pNameIconGd && (pMenu->Item[i].pNameIconGd->width > MaxNameIconWidth)) MaxNameIconWidth = pMenu->Item[i].pNameIconGd->width;
        if(pMenu->Item[i].pValueIconGd && (pMenu->Item[i].pValueIconGd->width > MaxValueIconWidth)) MaxValueIconWidth = pMenu->Item[i].pValueIconGd->width;
        if(pMenu->Item[i].ColorPatch && (MaxValueIconWidth < 50)) MaxValueIconWidth = 50;
    }

    if(MaxNameIconWidth) MaxNameIconWidth += 8;
    if(MaxValueIconWidth) MaxValueIconWidth += 8;

    //The background
    TAP_Osd_Draw3dBoxFill(OSDRgn, 60, 96, 600, 367, RGB(30, 30, 30), RGB(30, 30, 30), RGB(30, 30, 30));

    for(i = 0; i < 10; i++)
    {
        pItem = &pMenu->Item[i + pMenu->CurrentTopIndex];

        //Draw the background or selection bar and the optional value arrows
        if((i + pMenu->CurrentTopIndex) == pMenu->CurrentSelection)
        {
            OSDMenuDrawCursor(60, 95 + (i * 37), 600);

            if(pMenu->HasValueColumn && pItem->ValueArrows)
            {
                TAP_Osd_PutGd(OSDRgn, pMenu->ValueXPos + 20 , 95 + 10 +(i * 37), (MenuCursorType == CT_Standard ? &_pfeil_l_Gd : &_pfeil_l_bright_Gd), TRUE);
                TAP_Osd_PutGd(OSDRgn, 640 , 95 + 10 +(i * 37), (MenuCursorType == CT_Standard ? &_pfeil_r_Gd : &_pfeil_r_bright_Gd), TRUE);
            }
        }
        else
        {
            TAP_Osd_DrawRectangle(OSDRgn, 60, 130 + (i * 37), 600, 2, 1, RGB(16, 16, 16));
        }

        XEnd = (pMenu->HasValueColumn ? pMenu->ValueXPos : 645);
        Y = 99 + (i * 37);

        if(pItem->Selectable)
            ItemColor = pItem->TextColor;
        else
            ItemColor = RGB(128, 128, 140);

        //Line numbers
        if(pMenu->NumberedItems)
        {
            int MaxX = 100;

            XStart = 101;

            if(pItem->CustomIndex >= 0)
            {
                TAP_SPrint(s, "%2.2d", pItem->CustomIndex);

                if(pItem->CustomIndex > 99)
                {
                    XStart += 10;
                    MaxX += 10;
                }

                if(pItem->CustomIndex > 999)
                {
                    XStart += 10;
                    MaxX += 10;
                }
            }
            else
            {
                TAP_SPrint(s, "%2.2d", i + pMenu->CurrentTopIndex + 1);

                if(i + pMenu->CurrentTopIndex + 1 > 99)
                {
                    XStart += 10;
                    MaxX += 10;
                }

                if(i + pMenu->CurrentTopIndex + 1 > 999)
                {
                    XStart += 10;
                    MaxX += 10;
                }
            }

            FMUC_PutStringAA(OSDRgn, 71, Y + 5 + FONTYOFFSET, MaxX, s, ItemColor, COLOR_None, pMenu->FontListLineNumber, FALSE, ALIGN_LEFT, 1);
        }
        else
        {
            XStart = 76;
        }

        //Icons on the left column
        if(pItem->pNameIconGd)
            TAP_Osd_PutGd(OSDRgn, XStart, Y + 13 - (pItem->pNameIconGd->height >> 1), pItem->pNameIconGd, TRUE);

        //The text of the left column
        FMUC_PutStringAA(OSDRgn, XStart + MaxNameIconWidth, Y + 5 + FONTYOFFSET, XEnd, pItem->Name, ItemColor, COLOR_None, pMenu->FontListNameColumn, TRUE, ALIGN_LEFT, 1);

        if(pMenu->HasValueColumn)
        {
            //The text of the right column
            FMUC_PutStringAA(OSDRgn, pMenu->ValueXPos + 45 + MaxValueIconWidth, Y + 5 + FONTYOFFSET, 645, pItem->Value, ItemColor, COLOR_None, pMenu->FontListValueColumn, TRUE, ALIGN_LEFT, 1);

            //The color patch or icon of the right column. The former has priority
            if(pItem->ColorPatch)
            {
                TAP_Osd_FillBox(OSDRgn, pMenu->ValueXPos + 45, Y + 5, 50, 18, (pItem->ColorPatch & 0x00ffffff) | 0xff000000);
                TAP_Osd_DrawRectangle(OSDRgn, pMenu->ValueXPos + 45, Y + 5, 50, 18, 1, RGB(192,192,192));
            }
            else
            {
                if(pItem->pValueIconGd)
                    TAP_Osd_PutGd(OSDRgn, pMenu->ValueXPos + 45 , Y + 13 - (pItem->pValueIconGd->height >> 1), pItem->pValueIconGd, TRUE);
            }
        }
    }
Exemplo n.º 29
0
void Tapplication::BlankScreen()
{
	TRACE("Blanking screen\n");
	TAP_Osd_FillBox(screenRgn, 0, 0, MAX_SCREEN_X, MAX_SCREEN_Y, COLOR_None);
}