Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UMenu.UMenuOptionsMenu


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
class UMenuOptionsMenu extends UWindowPulldownMenu;

var UWindowPulldownMenuItem Preferences, Prioritize, Desktop, Advanced, Player, AdvPreferences;

var localized string PreferencesName;
var localized string PreferencesHelp;
var localized string PrioritizeName;
var localized string PrioritizeHelp;
var localized string DesktopName;
var localized string DesktopHelp;
var localized string PlayerMenuName;
var localized string PlayerMenuHelp;
var localized string AdvancedOptionsName,AdvancedOptionsHelp;

var Class<UWindowWindow> PlayerWindowClass;
var class<UWindowWindow> WeaponPriorityWindowClass;

function Created()
{
	Super.Created();

	Preferences = AddMenuItem(PreferencesName, None);
	Player = AddMenuItem(PlayerMenuName, None);
	Prioritize = AddMenuItem(PrioritizeName, None);
	AdvPreferences = AddMenuItem(AdvancedOptionsName, None);

	AddMenuItem("-", None);

	Desktop = AddMenuItem(DesktopName, None);
	Desktop.bChecked = Root.Console.ShowDesktop;
}

function UWindowWindow PlayerSetup()
{
	return Root.CreateWindow(PlayerWindowClass, 100, 100, 200, 200, Self, True);
}

function ShowPreferences(optional bool bNetworkSettings)
{
	local UMenuOptionsWindow O;

	O = UMenuOptionsWindow(Root.CreateWindow(Class'UMenuOptionsWindow', 100, 100, 200, 200, Self, True));
	if (bNetworkSettings)
		UMenuOptionsClientWindow(O.ClientArea).ShowNetworkTab();
}

function ExecuteItem(UWindowPulldownMenuItem I)
{
	switch (I)
	{
	case Preferences:
		ShowPreferences();
		break;
	case AdvPreferences:
		GetPlayerOwner().ConsoleCommand("Preferences");
		break;
	case Prioritize:
		// Create prioritize weapons dialog.
		Root.CreateWindow(WeaponPriorityWindowClass, 100, 100, 200, 200, Self, True);
		break;
	case Desktop:
		// Toggle show desktop.
		Desktop.bChecked = !Desktop.bChecked;
		Root.Console.ShowDesktop = !Root.Console.ShowDesktop;
		Root.Console.bNoDrawWorld = Root.Console.ShowDesktop;
		Root.Console.SaveConfig();
		break;
	case Player:
		// Create player dialog.
		PlayerSetup();
		break;
	}

	Super.ExecuteItem(I);
}

function Select(UWindowPulldownMenuItem I)
{
	switch (I)
	{
	case Preferences:
		UMenuMenuBar(GetMenuBar()).SetHelp(PreferencesHelp);
		break;
	case Prioritize:
		UMenuMenuBar(GetMenuBar()).SetHelp(PrioritizeHelp);
		break;
	case Desktop:
		UMenuMenuBar(GetMenuBar()).SetHelp(DesktopHelp);
		break;
	case Player:
		UMenuMenuBar(GetMenuBar()).SetHelp(PlayerMenuHelp);
		break;
	case AdvPreferences:
		UMenuMenuBar(GetMenuBar()).SetHelp(AdvancedOptionsHelp);
		break;
	}

	Super.Select(I);
}

defaultproperties
{
				PreferencesName="P&references"
				PreferencesHelp="Change your game options, audio and video setup, HUD configuration, controls and other options."
				PrioritizeName="&Weapons"
				PrioritizeHelp="Change your weapon priority, view and set weapon options."
				DesktopName="Show &Desktop"
				DesktopHelp="Toggle between showing your game behind the menus, or the desktop logo."
				PlayerMenuName="&Player Setup"
				PlayerMenuHelp="Configure your player setup for multiplayer and botmatch gaming."
				AdvancedOptionsName="&Advanced Options"
				AdvancedOptionsHelp="Bring up the Advanced Options menu, where you can configure most of the custom mods."
				PlayerWindowClass=Class'UMenu.UMenuPlayerWindow'
				WeaponPriorityWindowClass=Class'UMenu.UMenuWeaponPriorityWindow'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:30.000 - Creation time: zo 11-11-2012 21:14:21.615 - Created with UnCodeX