UMenu
Class UMenuGameSettingsCWindow

source: e:\games\UnrealTournament\UMenu\Classes\UMenuGameSettingsCWindow.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowWindow
         |
         +--UWindow.UWindowClientWindow
            |
            +--UWindow.UWindowDialogClientWindow
               |
               +--UWindow.UWindowPageWindow
                  |
                  +--UMenu.UMenuPageWindow
                     |
                     +--UMenu.UMenuGameSettingsBase
                        |
                        +--UMenu.UMenuGameSettingsCWindow
Direct Known Subclasses:None

class UMenuGameSettingsCWindow
extends UMenu.UMenuGameSettingsBase



Function Summary
 void LoadCurrentValues()
 void SpeedChanged()
 void StyleChanged()



Source Code


00001	class UMenuGameSettingsCWindow extends UMenuGameSettingsBase;
00002	
00003	function LoadCurrentValues()
00004	{
00005		local int S;
00006	
00007		if ( Class<DeathMatchGame>(BotmatchParent.GameClass).Default.bMegaSpeed )
00008			StyleCombo.SetSelectedIndex(2);
00009		else if ( Class<DeathMatchGame>(BotmatchParent.GameClass).Default.bHardcoreMode )
00010			StyleCombo.SetSelectedIndex(1);
00011		else
00012			StyleCombo.SetSelectedIndex(0);
00013	
00014		S = Class<DeathMatchGame>(BotmatchParent.GameClass).Default.GameSpeed * 100.0;
00015		SpeedSlider.SetValue(S);
00016		SpeedSlider.SetText(SpeedText$" ["$S$"%]:");
00017	}
00018	
00019	function StyleChanged()
00020	{
00021		switch (StyleCombo.GetSelectedIndex())
00022		{
00023			case 0:
00024				Class<DeathMatchGame>(BotmatchParent.GameClass).Default.bMegaSpeed = false;
00025				Class<DeathMatchGame>(BotmatchParent.GameClass).Default.bHardCoreMode = false;
00026				break;
00027			case 1:
00028				Class<DeathMatchGame>(BotmatchParent.GameClass).Default.bMegaSpeed = false;
00029				Class<DeathMatchGame>(BotmatchParent.GameClass).Default.bHardCoreMode = true;
00030				break;
00031			case 2:
00032				Class<DeathMatchGame>(BotmatchParent.GameClass).Default.bMegaSpeed = true;
00033				Class<DeathMatchGame>(BotmatchParent.GameClass).Default.bHardCoreMode = true;
00034				break;
00035		}
00036	}
00037	
00038	function SpeedChanged()
00039	{
00040		local int S;
00041	
00042		S = SpeedSlider.GetValue();
00043		SpeedSlider.SetText(SpeedText$" ["$S$"%]:");
00044		Class<DeathMatchGame>(BotmatchParent.GameClass).Default.GameSpeed = float(S) / 100.0;
00045	}
00046	
00047	defaultproperties
00048	{
00049	}

End Source Code