RMenu
Class RuneMenuOptionsTop

source: c:\runehov\RMenu\Classes\RuneMenuOptionsTop.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowWindow
         |
         +--UWindow.UWindowClientWindow
            |
            +--UWindow.UWindowDialogClientWindow
               |
               +--RMenu.RuneWindow
                  |
                  +--RMenu.RuneMenuTopWindow
                     |
                     +--RMenu.RuneMenuOptionsTop
Direct Known Subclasses:None

class RuneMenuOptionsTop
extends RMenu.RuneMenuTopWindow

//============================================================================= // RuneMenuOptionsTop //=============================================================================
Variables
 string AudioText
 string ControlsText
 InputButton, GameButton
 string GameText
 InputWindow, GameWindow
 string InputText
 string VideoHelp,AudioHelp,GameHelp,ControlsHelp,InputHelp
 string VideoText


Function Summary
 void Created()
     
//=============================================================================
// Class Functions
//=============================================================================
 void HideAllWindows()
 void Notify(UWindowDialogControl C, byte E)



Source Code


00001	//=============================================================================
00002	// RuneMenuOptionsTop
00003	//=============================================================================
00004	class RuneMenuOptionsTop extends RuneMenuTopWindow;
00005	
00006	
00007	var RuneButton VideoButton, AudioButton, ControlsButton, InputButton, GameButton;
00008	var UWindowWindow VideoWindow, AudioWindow, ControlsWindow, InputWindow, GameWindow;
00009	
00010	var localized string VideoText;
00011	var localized string AudioText;
00012	var localized string GameText;
00013	var localized string ControlsText;
00014	var localized string InputText;
00015	var localized string VideoHelp,AudioHelp,GameHelp,ControlsHelp,InputHelp;
00016	
00017	//=============================================================================
00018	// Class Functions
00019	//=============================================================================
00020	
00021	function Created()
00022	{
00023		Super.Created();
00024	
00025		VideoButton = RuneButton(CreateControl(class'RuneButton', 0, 0, 130, 30));
00026		VideoButton.Text=VideoText;
00027		VideoButton.SetHelpText(VideoHelp);
00028		VideoButton.WinLeft = 10;
00029		VideoButton.WinTop = 10;
00030	
00031		AudioButton = RuneButton(CreateControl(class'RuneButton', 0, 0, 130, 30));
00032		AudioButton.Text=AudioText;
00033		AudioButton.SetHelpText(AudioHelp);
00034		AudioButton.WinLeft = 150;
00035		AudioButton.WinTop = 10;
00036	
00037		GameButton = RuneButton(CreateControl(class'RuneButton', 0, 0, 130, 30));
00038		GameButton.Text=GameText;
00039		GameButton.SetHelpText(GameHelp);
00040		GameButton.WinLeft = 290;
00041		GameButton.WinTop = 10;
00042	
00043		ControlsButton = RuneButton(CreateControl(class'RuneButton', 0, 0, 130, 30));
00044		ControlsButton.Text=ControlsText;
00045		ControlsButton.SetHelpText(ControlsHelp);
00046		ControlsButton.WinLeft = 85;
00047		ControlsButton.WinTop = 60;
00048	
00049		InputButton = RuneButton(CreateControl(class'RuneButton', 0, 0, 130, 30));
00050		InputButton.Text=InputText;
00051		InputButton.SetHelpText(InputHelp);
00052		InputButton.WinLeft = 225;
00053		InputButton.WinTop = 60;
00054	}
00055	
00056	function Notify(UWindowDialogControl C, byte E)
00057	{
00058		if(E == DE_Click)
00059		{
00060			switch(C)
00061			{
00062				case VideoButton:
00063					HideAllWindows();
00064					if(VideoWindow == None)
00065						VideoWindow = Root.CreateWindow(class'RuneMenuVideoOptionsScrollClient', 200, 100, 440, 360);
00066					if (VideoWindow!=None)
00067						VideoWindow.ShowWindow();
00068					break;
00069				case AudioButton:
00070					HideAllWindows();
00071					if(AudioWindow == None)
00072						AudioWindow = Root.CreateWindow(class'RuneMenuAudioScrollClient', 200, 100, 440, 360);
00073					if (AudioWindow!=None)
00074						AudioWindow.ShowWindow();
00075					break;
00076				case GameButton:
00077					HideAllWindows();
00078					if(GameWindow == None)
00079						GameWindow = Root.CreateWindow(class'RuneMenuGameOptionsScrollClient', 200, 100, 440, 360);
00080					if(GameWindow!=None)
00081						GameWindow.ShowWindow();
00082					break;
00083				case ControlsButton:
00084					HideAllWindows();
00085					if(ControlsWindow == None)
00086						ControlsWindow = Root.CreateWindow(class'RuneMenuCustomizeScrollClient', 200, 100, 440, 360);
00087					if(ControlsWindow!=None)
00088						ControlsWindow.ShowWindow();
00089					break;
00090				case InputButton:
00091					HideAllWindows();
00092					if(InputWindow == None)
00093						InputWindow = Root.CreateWindow(class'RuneMenuInputOptionsScrollClient', 200, 100, 440, 360);
00094					if(InputWindow!=None)
00095						InputWindow.ShowWindow();
00096					break;
00097			}
00098		}
00099	}
00100	
00101	function HideAllWindows()
00102	{
00103		if (VideoWindow!=None)
00104			VideoWindow.HideWindow();
00105		if (AudioWindow!=None)
00106			AudioWindow.HideWindow();
00107		if (ControlsWindow!=None)
00108			ControlsWindow.HideWindow();
00109		if (InputWindow!=None)
00110			InputWindow.HideWindow();
00111		if (GameWindow!=None)
00112			GameWindow.HideWindow();
00113	}
00114	
00115	defaultproperties
00116	{
00117	     VideoText="Video"
00118	     AudioText="Audio"
00119	     GameText="Game"
00120	     ControlsText="Controls"
00121	     InputText="Input"
00122	     VideoHelp="Video Options"
00123	     AudioHelp="Audio Options"
00124	     GameHelp="Game Options"
00125	     ControlsHelp="Customize player controls"
00126	     InputHelp="Choose input device(s)"
00127	}

End Source Code