GUI
Class GUIFont

source: C:\XIII\GUI\Classes\GUIFont.uc
Core.Object
   |
   +--GUI.GUI
      |
      +--GUI.GUIFont
Direct Known Subclasses:GUIBigFont, GUISmallFont

class GUIFont
extends GUI.GUI

// ==================================================================== // (c) 2002, Epic Games, Inc. All Rights Reserved // ====================================================================

Function Summary
 Font LoadFont(int i)
 Font LoadFontStatic(int i)
     
// Dynamically load font.



Source Code


00001	// ====================================================================
00002	//  (c) 2002, Epic Games, Inc.  All Rights Reserved
00003	// ====================================================================
00004	
00005	class GUIFont extends GUI
00006		Native;
00007	
00008	var(Menu) string		KeyName;
00009	var(Menu) bool			bFixedSize;		// If true, only FontArray[0] is used
00010	var(Menu) localized array<String>	FontArrayNames;	// Holds all of the names of the fonts 		
00011	var(Menu) array<Font>	FontArrayFonts;	// Holds all of the fonts
00012	
00013	native event Font GetFont(int XRes);			// Returns the font for the current resolution
00014	
00015	// Dynamically load font.
00016	static function Font LoadFontStatic(int i)
00017	{
00018		if( i>=default.FontArrayFonts.Length || default.FontArrayFonts[i] == None )
00019		{
00020			default.FontArrayFonts[i] = Font(DynamicLoadObject(default.FontArrayNames[i], class'Font'));
00021			if( default.FontArrayFonts[i] == None )
00022				Log("Warning: "$default.Class$" Couldn't dynamically load font "$default.FontArrayNames[i]);
00023		}
00024	
00025		return default.FontArrayFonts[i];
00026	}
00027	
00028	function Font LoadFont(int i)
00029	{
00030		if( i>=FontArrayFonts.Length || FontArrayFonts[i] == None )
00031		{
00032			FontArrayFonts[i] = Font(DynamicLoadObject(FontArrayNames[i], class'Font'));
00033			if( FontArrayFonts[i] == None )
00034				Log("Warning: "$Self$" Couldn't dynamically load font "$FontArrayNames[i]);
00035		}
00036		return FontArrayFonts[i];
00037	}
00038	
00039	
00040	
00041	defaultproperties
00042	{
00043	}

End Source Code