1//************************************************************************** 2//** 3//** ## ## ## ## ## #### #### ### ### 4//** ## ## ## ## ## ## ## ## ## ## #### #### 5//** ## ## ## ## ## ## ## ## ## ## ## ## ## ## 6//** ## ## ######## ## ## ## ## ## ## ## ### ## 7//** ### ## ## ### ## ## ## ## ## ## 8//** # ## ## # #### #### ## ## 9//** 10//** $Id: MenuScreenOptions.vc 2936 2007-12-03 22:58:22Z firebrand_kh $ 11//** 12//** Copyright (C) 1999-2006 Jānis Legzdiņš 13//** 14//** This program is free software; you can redistribute it and/or 15//** modify it under the terms of the GNU General Public License 16//** as published by the Free Software Foundation; either version 2 17//** of the License, or (at your option) any later version. 18//** 19//** This program is distributed in the hope that it will be useful, 20//** but WITHOUT ANY WARRANTY; without even the implied warranty of 21//** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22//** GNU General Public License for more details. 23//** 24//************************************************************************** 25 26class MenuScreenOptions : MenuScreen; 27 28//========================================================================== 29// 30// CreateChoices 31// 32//========================================================================== 33 34void CreateChoices() 35{ 36 MenuTextButton Btn; 37 int currentY; 38 39 currentY = ChoicesStartY; 40 41 Btn = MenuTextButton(NewChild(MenuSmallTextButton)); 42 Btn.SetOrigin(ChoicesStartX, currentY); 43 Btn.Text = "Controls"; 44 Btn.Activated = ActivateControls; 45 currentY += Btn.Height; 46 47 Btn = MenuTextButton(NewChild(MenuSmallTextButton)); 48 Btn.SetOrigin(ChoicesStartX, currentY); 49 Btn.Text = "Controls 2"; 50 Btn.Activated = ActivateControls2; 51 currentY += Btn.Height; 52 53 Btn = MenuTextButton(NewChild(MenuSmallTextButton)); 54 Btn.SetOrigin(ChoicesStartX, currentY); 55 Btn.Text = "Mouse Options"; 56 Btn.Activated = ActivateMouseOpt; 57 currentY += Btn.Height; 58 59 Btn = MenuTextButton(NewChild(MenuSmallTextButton)); 60 Btn.SetOrigin(ChoicesStartX, currentY); 61 Btn.Text = "Screen Resolution"; 62 Btn.Activated = ActivateScreenResolution; 63 currentY += Btn.Height; 64 65 Btn = MenuTextButton(NewChild(MenuSmallTextButton)); 66 Btn.SetOrigin(ChoicesStartX, currentY); 67 Btn.Text = "Video options"; 68 Btn.Activated = ActivateVideoOpt; 69 currentY += Btn.Height; 70 71 Btn = MenuTextButton(NewChild(MenuSmallTextButton)); 72 Btn.SetOrigin(ChoicesStartX, currentY); 73 Btn.Text = "Sound Settings"; 74 Btn.Activated = ActivateSoundOpt; 75 currentY += Btn.Height; 76 77 Btn = MenuTextButton(NewChild(MenuSmallTextButton)); 78 Btn.SetOrigin(ChoicesStartX, currentY); 79 Btn.Text = "Gameplay options"; 80 Btn.Activated = ActivateGameplayOpt; 81 currentY += Btn.Height; 82 83 Btn = MenuTextButton(NewChild(MenuSmallTextButton)); 84 Btn.SetOrigin(ChoicesStartX, currentY); 85 Btn.Text = "Go to console"; 86 Btn.Activated = ActivateConsole; 87 currentY += Btn.Height; 88} 89 90//========================================================================== 91// 92// ActivateControls 93// 94//========================================================================== 95 96void ActivateControls(Object Sender) 97{ 98 ClGame.PushMenuScreen(ClGame.SpawnMenu(MenuScreenControls)); 99} 100 101//========================================================================== 102// 103// ActivateControls2 104// 105//========================================================================== 106 107void ActivateControls2(Object Sender) 108{ 109 ClGame.PushMenuScreen(ClGame.SpawnMenu(MenuScreenControls2)); 110} 111 112//========================================================================== 113// 114// ActivateMouseOpt 115// 116//========================================================================== 117 118void ActivateMouseOpt(Object Sender) 119{ 120 ClGame.PushMenuScreen(ClGame.SpawnMenu(MenuScreenMouseOptions)); 121} 122 123//========================================================================== 124// 125// ActivateScreenResolution 126// 127//========================================================================== 128 129void ActivateScreenResolution(Object Sender) 130{ 131 ClGame.PushMenuScreen(ClGame.SpawnMenu(MenuScreenScreenResolution)); 132} 133 134//========================================================================== 135// 136// ActivateVideoOpt 137// 138//========================================================================== 139 140void ActivateVideoOpt(Object Sender) 141{ 142 ClGame.PushMenuScreen(ClGame.SpawnMenu(MenuScreenVideoOptions)); 143} 144 145//========================================================================== 146// 147// ActivateSoundOpt 148// 149//========================================================================== 150 151void ActivateSoundOpt(Object Sender) 152{ 153 ClGame.PushMenuScreen(ClGame.SpawnMenu(MenuScreenSoundOptions)); 154} 155 156//========================================================================== 157// 158// ActivateGameplayOpt 159// 160//========================================================================== 161 162void ActivateGameplayOpt(Object Sender) 163{ 164 ClGame.PushMenuScreen(ClGame.SpawnMenu(MenuScreenGameplayOptions)); 165} 166 167//========================================================================== 168// 169// ActivateConsole 170// 171//========================================================================== 172 173void ActivateConsole(Object Sender) 174{ 175 CmdBuf_AddText("ToggleConsole\n"); 176} 177 178defaultproperties 179{ 180 ChoicesStartX = 160; 181 ChoicesStartY = 32; 182 SelectorType = MenuSelector_SmallRight; 183 Title = "OPTIONS"; 184} 185