void RenderEditorInfo( )
{
	wchar_t					FPSText[ 50 ];
	static INT32		iSpewWarning = 0;
	INT16						iMapIndex;

	SetFont( FONT12POINT1 );
	SetFontForeground( FONT_BLACK );
	SetFontBackground( FONT_BLACK );

	//Display the mapindex position
	if( GetMouseMapPos( &iMapIndex ) )
		swprintf( FPSText, L"   (%d)   ", iMapIndex );
	else
		swprintf( FPSText, L"          " );
	mprintfEditor( (UINT16)(50-StringPixLength( FPSText, FONT12POINT1 )/2), 463, FPSText );

	switch( iCurrentTaskbar )
	{
		case TASK_OPTIONS:
			if( !gfWorldLoaded || giCurrentTilesetID < 0 )
				mprintf( 260, 445, L"No map currently loaded." );
			else
				mprintf( 260, 445, L"File:  %S, Current Tileset:  %s", 
					gubFilename, gTilesets[ giCurrentTilesetID ].zName );
			break;
		case TASK_TERRAIN:
			if( gusSelectionType == LINESELECTION )
				swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );
			DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, 220, 430, 60, 30 );
			swprintf( FPSText, L"%d%%", gusSelectionDensity );
			DrawEditorInfoBox( FPSText, FONT12POINT1, 310, 430, 40, 30 );
			break;
		case TASK_ITEMS:
			RenderEditorItemsInfo();
			UpdateItemStatsPanel();
			break;
		case TASK_BUILDINGS:
			UpdateBuildingsInfo();
			if( gusSelectionType == LINESELECTION )
				swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );
			DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, 530, 430, 60, 30 );
			break;
		case TASK_MERCS:
			UpdateMercsInfo();
			break;
		case TASK_MAPINFO:
			UpdateMapInfo();
			if( gusSelectionType == LINESELECTION )
				swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );
			DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, 440, 430, 60, 30 );
			break;
	}
}
void RenderEditorInfo( )
{
	CHAR16					FPSText[ 50 ];
	static INT32		iSpewWarning = 0;
	INT32				iMapIndexD;

	//dnl ch52 091009
	SetFont(FONT12ARIAL);
	SetFontShadow(FONT_NEARBLACK);
	SetFontForeground(FONT_GRAY2);
	SetFontBackground(FONT_BLACK);

	//dnl ch1 101009 Display the mapindex position
	if(GetMouseMapPos(&iMapIndexD))
	{
		INT16 sGridX, sGridY;
		GetMouseXY(&sGridX, &sGridY);
		swprintf(FPSText, L"%4d %4d %6d ", sGridX, sGridY, iMapIndexD);
	}
	else
		swprintf(FPSText, L"                  ");

	mprintfEditor( (UINT16)(iScreenWidthOffset + 50-StringPixLength( FPSText, FONT12POINT1 )/2), 2 * iScreenHeightOffset + 463, FPSText );

	switch( iCurrentTaskbar )
	{
		case TASK_OPTIONS:
			mprintf(iScreenWidthOffset+71+15, SCREEN_HEIGHT-117, iRenderEditorInfoText[0]);//dnl ch33 160909
			if( !gfWorldLoaded || giCurrentTilesetID < 0 )
				mprintf( iScreenWidthOffset + 260, 2 * iScreenHeightOffset + 445, iRenderEditorInfoText[1] );
			else
				mprintf( iScreenWidthOffset + 260, 2 * iScreenHeightOffset + 445, iRenderEditorInfoText[2], gubFilename, gTilesets[ giCurrentTilesetID ].zName );

			// TODO.MAP
			mprintf(iScreenWidthOffset+20, SCREEN_HEIGHT-40, iRenderEditorInfoText[3]);

			UpdateOptions();
			break;
		case TASK_TERRAIN:

			// WANNE: Comment this two lines, because we always get an exception here.
			//if( gusSelectionType == LINESELECTION )
			//	swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );

			DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, iScreenWidthOffset + 220, 2 * iScreenHeightOffset + 430, 60, 30 );
			swprintf( FPSText, L"%d%%", gusSelectionDensity );
			DrawEditorInfoBox( FPSText, FONT12POINT1, iScreenWidthOffset + 310, 2 * iScreenHeightOffset + 430, 40, 30 );
			break;
		case TASK_ITEMS:
			RenderEditorItemsInfo();
			UpdateItemStatsPanel();
			break;
		case TASK_BUILDINGS:
			UpdateBuildingsInfo();


			// WANNE: Comment this two lines, because we always get an exception here.
			//if( gusSelectionType == LINESELECTION )
			//	swprintf( wszSelType[LINESELECTION], L"%d", gusSelectionWidth );

			DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 430, 60, 30 );
			break;
		case TASK_MERCS:
			UpdateMercsInfo();
				#ifdef JA113DEMO
				DisableButton (iEditorButton[ MERCS_CIVILIANTOGGLE ]);
				DisableButton (iEditorButton[ MERCS_CIVILIAN ]);
				#endif
			break;
		case TASK_MAPINFO:
			UpdateMapInfo();
			// WANNE: EDITOR: Comment this two lines, because we always get an exception here!
			//if( gusSelectionType == LINESELECTION )
			//	swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );

			DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, iScreenWidthOffset + 440, 2 * iScreenHeightOffset + 430, 60, 30 );
			break;
	}
}