void OSDMenuMessageBoxDestroyNoOSDUpdate(void)
{
  TRACEENTER();

  tOSDMapInfo          *OSDMapInfo;

  if(MessageBoxOSDRgn)
  {
    TAP_Osd_Delete(MessageBoxOSDRgn);
    MessageBoxOSDRgn = 0;

    if(InfoBoxSaveArea)
    {
      if(MyOSDRgn)
      {
        OSDMapInfo = (tOSDMapInfo*) FIS_vOsdMap();
        if(OSDMapInfo)
          TAP_Osd_RestoreBox(MyOSDRgn, InfoBoxSaveAreaX - OSDMapInfo[MyOSDRgn].x, InfoBoxSaveAreaY - OSDMapInfo[MyOSDRgn].y, _InfoBox_Gd.width, _InfoBox_Gd.height, InfoBoxSaveArea);
      }
      else if(OSDRgn) TAP_Osd_RestoreBox(OSDRgn, InfoBoxSaveAreaX, InfoBoxSaveAreaY, _InfoBox_Gd.width, _InfoBox_Gd.height, InfoBoxSaveArea);

      TAP_MemFree(InfoBoxSaveArea);
      InfoBoxSaveArea = NULL;
      MyOSDRgn = 0;
    }
  }

  OSDMenuFreeStdFonts();

  TRACEEXIT();
}
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();
}
Esempio n. 3
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 );
	}
}
Esempio n. 4
0
void BitmapPage::OnClose()
{
	int x = (MAX_SCREEN_X - width) / 2;
	int y = (MAX_SCREEN_Y - height) / 2;

	TAP_Osd_RestoreBox(GetTAPScreenRegion(), x,y, width,height, windowCopy);
	TAP_MemFree(windowCopy);
}
Esempio n. 5
0
//-----------------------------------------------------------------------
//
void CloseYesNoWindow(void)
{
	yesnoWindowShowing = FALSE;
	TAP_Osd_RestoreBox(rgn, YESNO_WINDOW_X, YESNO_WINDOW_Y, YESNO_WINDOW_W, YESNO_WINDOW_H, YesNoWindowCopy);
	TAP_MemFree(YesNoWindowCopy);
	
	YesNoCallback( YesNoResult );
	
}
Esempio n. 6
0
// Routine to handle the closing of the timer window
void ThreeOption_Deactivate( int option ){
	ThreeOption_Active = FALSE;
	// Restore what we had drawn over
	TAP_Osd_RestoreBox(ThreeOption_RGN, ThreeOption_X, ThreeOption_Y, ThreeOption_W, ThreeOption_H, ThreeOption_Base);
	TAP_MemFree(ThreeOption_Base);
	ThreeOption_Base = NULL;
	ThreeOption_MemFree();
	ThreeOption_Callback(option);
}
Esempio n. 7
0
//-----------------------------------------------------------------------
//
void YesNoBox::OnClose()
{
	TAP_Osd_RestoreBox(GetTAPScreenRegion(), YESNO_WINDOW_X, YESNO_WINDOW_Y, YESNO_WINDOW_W, YESNO_WINDOW_H, windowCopy);
	TAP_MemFree(windowCopy);

	if ( _callback && result )
	{
		// commented out as it doesn't work at the moment
		_callback( result );
	}
}
Esempio n. 8
0
// Routine to handle the closing of the timer window
void GuideSortOrder_Deactivate( bool yes ){
	GuideSortOrder_Active = FALSE;
	// Restore what we had drawn over
	TAP_Osd_RestoreBox(GuideSortOrder_RGN, GuideSortOrder_X, GuideSortOrder_Y, GuideSortOrder_W, GuideSortOrder_H, GuideSortOrder_Base);
	TAP_MemFree(GuideSortOrder_Base);
	GuideSortOrder_Base = NULL;
	GuideSortOrder_MemFree();
	if( yes ){
		GuideSortOrder_Callback(TRUE, GuideSortOrder_Selected);
	} else {
		GuideSortOrder_Callback(FALSE, GuideSortOrder_Selected);
	}
}
Esempio n. 9
0
void    ShowMessageWin( word msgRgn, char* msg1, char* msg2, char* msg3, int delay )
{
    byte*  msgWindowCopy;
    
    // Save the region where we are about to display the pop-up.
    msgWindowCopy = TAP_Osd_SaveBox(msgRgn, MSG_SCREEN_X, MSG_SCREEN_Y, MSG_SCREEN_W, MSG_SCREEN_H);

    ShowMessageBox(msgRgn, msg1, msg2, msg3 );

    TAP_Delay( delay );    

	TAP_Osd_RestoreBox(msgRgn, MSG_SCREEN_X, MSG_SCREEN_Y, MSG_SCREEN_W, MSG_SCREEN_H, msgWindowCopy);
	TAP_MemFree(msgWindowCopy);

}
Esempio n. 10
0
//-----------------------------------------------------------------------
//
void CloseArchiveMoveWindow(void)
{
    int index;

    appendToLogfile("CloseArchiveMoveWindow: Started.", INFO);
     
	moveWindowShowing = FALSE;
	TAP_Osd_RestoreBox(rgn, MOVE_WINDOW_X, MOVE_WINDOW_Y, MOVE_WINDOW_W, MOVE_WINDOW_H, moveWindowCopy);
	TAP_MemFree(moveWindowCopy);           // Free memory allocated to storing old screen area.
	TAP_Osd_Delete(moveRgn);               // Free memory allocated to virtual screen area.
	// Release any memory allocated to the "moveFiles" array.   
    for ( index=1; index<=numberOfDestinationFolders ; index++)
	{
       if (moveFiles[index] != NULL) 
       {
           TAP_MemFree(moveFiles[index]);  // Free any previously allocated memory
           moveFiles[index] = NULL;        // Set the pointer to NULL so that it's all cleared.                   
       }
    }  
    appendToLogfile("CloseArchiveMoveWindow: Finished.", INFO);
}
void TAP_Osd_RestoreBox_Chk(char *Comment, word rgn, dword x, dword y, dword w, dword h, void *data)
{
  TRACEENTER();

  dword                 RgnH, RgnW;

  if(Comment)
  {
    RgnH = GetOSDRegionHeight(rgn);
    RgnW = GetOSDRegionWidth(rgn);

    if(!isOSDRegionAlive(rgn)) LogEntryFBLibPrintf(TRUE, "TAP_Osd_RestoreBox_Chk Warning: rgn(%d) points to an undefined region @ %s", rgn, Comment);
    if(x >= RgnW) LogEntryFBLibPrintf(TRUE, "TAP_Osd_RestoreBox_Chk Warning: x(%d) out of range @ %s", x, Comment);
    if(y >= RgnH) LogEntryFBLibPrintf(TRUE, "TAP_Osd_RestoreBox_Chk Warning: y(%d) out of range @ %s", y, Comment);
    if((x + w) > RgnW) LogEntryFBLibPrintf(TRUE, "TAP_Osd_RestoreBox_Chk Warning: x(%d) + w(%d) out of range @ %s", x, w, Comment);
    if((y + h) > RgnH) LogEntryFBLibPrintf(TRUE, "TAP_Osd_RestoreBox_Chk Warning: y(%d) + h(%d) out of range @ %s", y, h, Comment);
    if(data == NULL) LogEntryFBLibPrintf(TRUE, "TAP_Osd_RestoreBox_Chk Warning: trying to restore from NULL @ %s", Comment);
  }

  TAP_Osd_RestoreBox(rgn, x, y, w, h, data);

  TRACEEXIT();
}
Esempio n. 12
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;
	}
}
Esempio n. 13
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;
	}
}