Core.Object | +--UWindow.UWindowBase | +--UWindow.UWindowWindow | +--UTMenu.NotifyWindow | +--UTMenu.UTLadderStub
class
StubClass
string
StubClassName
bool
DemoHasTuts()
void
EvaluateMatch(optional bool)
font
GetACompletelyUnreadableFont(UWindowRootWindow Root)
GetAReallySmallFont(UWindowRootWindow Root)
GetBigFont(UWindowRootWindow Root)
GetHugeFont(UWindowRootWindow Root)
GetSmallFont(UWindowRootWindow Root)
GetSmallestFont(UWindowRootWindow Root)
IsDemo()
SetupWinParams(UWindowWindow Win, UWindowRootWindow RootWin, out int, out int)
00001 class UTLadderStub expands NotifyWindow 00002 abstract; 00003 00004 var globalconfig string StubClassName; 00005 var class<UTLadderStub> StubClass; 00006 00007 static function class<UTLadderStub> GetStubClass() 00008 { 00009 if(default.StubClass != None) 00010 return default.StubClass; 00011 00012 default.StubClass = class<UTLadderStub>(DynamicLoadObject(default.StubClassName, class'Class')); 00013 return default.StubClass; 00014 } 00015 00016 static function bool IsDemo() 00017 { 00018 return (class'GameInfo'.Default.DemoBuild == 1); 00019 } 00020 00021 static function bool DemoHasTuts() 00022 { 00023 return (class'GameInfo'.Default.DemoHasTuts == 1); 00024 } 00025 00026 static function SetupWinParams(UWindowWindow Win, UWindowRootWindow RootWin, out int W, out int H) 00027 { 00028 if (RootWin.WinWidth > 1024) 00029 { 00030 Win.WinWidth = 1024; 00031 Win.WinHeight = 768; 00032 Win.WinLeft = (RootWin.WinWidth - 1024) / 2; 00033 Win.WinTop = (RootWin.WinHeight - 768) / 2; 00034 } else { 00035 Win.WinWidth = (RootWin.WinHeight / 3) * 4; 00036 Win.WinHeight = RootWin.WinHeight; 00037 Win.WinTop = 0; 00038 Win.WinLeft = (RootWin.WinWidth - Win.WinWidth) / 2; 00039 } 00040 00041 W = Win.WinWidth / 4; 00042 H = W; 00043 00044 if(W > 256 || H > 256) 00045 { 00046 W = 256; 00047 H = 256; 00048 } 00049 } 00050 00051 static function font GetHugeFont(UWindowRootWindow Root) 00052 { 00053 if (Root.WinWidth*Root.GUIScale < 512) 00054 return Font(DynamicLoadObject("LadderFonts.UTLadder12", class'Font')); 00055 else if (Root.WinWidth*Root.GUIScale < 640) 00056 return Font(DynamicLoadObject("LadderFonts.UTLadder16", class'Font')); 00057 else if (Root.WinWidth*Root.GUIScale < 800) 00058 return Font(DynamicLoadObject("LadderFonts.UTLadder20", class'Font')); 00059 else if (Root.WinWidth*Root.GUIScale < 1024) 00060 return Font(DynamicLoadObject("LadderFonts.UTLadder22", class'Font')); 00061 else 00062 return Font(DynamicLoadObject("LadderFonts.UTLadder30", class'Font')); 00063 } 00064 00065 static function font GetBigFont(UWindowRootWindow Root) 00066 { 00067 if (Root.WinWidth*Root.GUIScale < 640) 00068 return Font(DynamicLoadObject("LadderFonts.UTLadder10", class'Font')); 00069 else if (Root.WinWidth*Root.GUIScale < 800) 00070 return Font(DynamicLoadObject("LadderFonts.UTLadder12", class'Font')); 00071 else if (Root.WinWidth*Root.GUIScale < 1024) 00072 return Font(DynamicLoadObject("LadderFonts.UTLadder16", class'Font')); 00073 else 00074 return Font(DynamicLoadObject("LadderFonts.UTLadder18", class'Font')); 00075 } 00076 00077 static function font GetSmallFont(UWindowRootWindow Root) 00078 { 00079 if (Root.WinWidth*Root.GUIScale < 800) 00080 return Font(DynamicLoadObject("LadderFonts.UTLadder10", class'Font')); 00081 else if (Root.WinWidth*Root.GUIScale < 1024) 00082 return Font(DynamicLoadObject("LadderFonts.UTLadder14", class'Font')); 00083 else 00084 return Font(DynamicLoadObject("LadderFonts.UTLadder16", class'Font')); 00085 } 00086 00087 static function font GetSmallestFont(UWindowRootWindow Root) 00088 { 00089 if (Root.WinWidth*Root.GUIScale < 800) 00090 return Font(DynamicLoadObject("LadderFonts.UTLadder10", class'Font')); 00091 else if (Root.WinWidth*Root.GUIScale < 1024) 00092 return Font(DynamicLoadObject("LadderFonts.UTLadder12", class'Font')); 00093 else 00094 return Font(DynamicLoadObject("LadderFonts.UTLadder14", class'Font')); 00095 } 00096 00097 static function font GetAReallySmallFont(UWindowRootWindow Root) 00098 { 00099 if (Root.WinWidth*Root.GUIScale < 1024) 00100 return Font(DynamicLoadObject("LadderFonts.UTLadder8", class'Font')); 00101 else 00102 return Font(DynamicLoadObject("LadderFonts.UTLadder10", class'Font')); 00103 } 00104 00105 static function font GetACompletelyUnreadableFont(UWindowRootWindow Root) 00106 { 00107 if (Root.WinWidth*Root.GUIScale < 1024) 00108 return Font(DynamicLoadObject("LadderFonts.UTLadder8", class'Font')); 00109 else 00110 return Font(DynamicLoadObject("LadderFonts.UTLadder8", class'Font')); 00111 } 00112 00113 function EvaluateMatch(optional bool bTrophyVictory); 00114 00115 defaultproperties 00116 { 00117 StubClassName="UTMenu.UTLadderStub" 00118 }