remove match timer configuration crap
This commit is contained in:
@@ -30,6 +30,7 @@ namespace OpenRA.GameRules
|
||||
public string Map = null;
|
||||
|
||||
public ServerSettings() { }
|
||||
|
||||
public ServerSettings(ServerSettings other)
|
||||
{
|
||||
Name = other.Name;
|
||||
@@ -77,23 +78,19 @@ namespace OpenRA.GameRules
|
||||
public class PlayerSettings
|
||||
{
|
||||
public string Name = "Newbie";
|
||||
[Obsolete] public Color Color1 = Color.FromArgb(255,160,238);
|
||||
[Obsolete] public Color Color2 = Color.FromArgb(68,0,56);
|
||||
public ColorRamp ColorRamp = new ColorRamp(75, 255, 180, 25);
|
||||
public string LastServer = "localhost:1234";
|
||||
}
|
||||
|
||||
public enum MouseScrollType { Disabled, Standard, Inverted }
|
||||
|
||||
public class GameSettings
|
||||
{
|
||||
public string[] Mods = { "ra" };
|
||||
public bool MatchTimer = true;
|
||||
public bool ShellmapMusic = true;
|
||||
|
||||
// Chat settings
|
||||
public bool TeamChatToggle = false;
|
||||
|
||||
// Behaviour settings
|
||||
public bool ViewportEdgeScroll = true;
|
||||
public MouseScrollType MouseScroll = MouseScrollType.Standard;
|
||||
public float ViewportEdgeScrollStep = 10f;
|
||||
|
||||
@@ -17,11 +17,6 @@ namespace OpenRA.Widgets
|
||||
{
|
||||
public Stopwatch Stopwatch;
|
||||
|
||||
public TimerWidget ()
|
||||
{
|
||||
IsVisible = () => Game.Settings.Game.MatchTimer;
|
||||
}
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
var s = WidgetUtils.FormatTime(Game.LocalTick);
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
{
|
||||
public class CncSettingsLogic
|
||||
{
|
||||
enum PanelType
|
||||
{
|
||||
General,
|
||||
Input
|
||||
}
|
||||
enum PanelType { General, Input }
|
||||
|
||||
PanelType Settings = PanelType.General;
|
||||
CncColorPickerPaletteModifier playerPalettePreview;
|
||||
@@ -72,10 +68,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
perfgraphCheckbox.IsChecked = () => debugSettings.PerfGraph;
|
||||
perfgraphCheckbox.OnClick = () => debugSettings.PerfGraph ^= true;
|
||||
|
||||
var matchtimerCheckbox = generalPane.GetWidget<CheckboxWidget>("MATCHTIME_CHECKBOX");
|
||||
matchtimerCheckbox.IsChecked = () => gameSettings.MatchTimer;
|
||||
matchtimerCheckbox.OnClick = () => gameSettings.MatchTimer ^= true;
|
||||
|
||||
var checkunsyncedCheckbox = generalPane.GetWidget<CheckboxWidget>("CHECKUNSYNCED_CHECKBOX");
|
||||
checkunsyncedCheckbox.IsChecked = () => debugSettings.SanityCheckUnsyncedCode;
|
||||
checkunsyncedCheckbox.OnClick = () => debugSettings.SanityCheckUnsyncedCode ^= true;
|
||||
@@ -114,7 +106,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
shellmapMusicCheckbox.IsChecked = () => gameSettings.ShellmapMusic;
|
||||
shellmapMusicCheckbox.OnClick = () => gameSettings.ShellmapMusic ^= true;
|
||||
|
||||
|
||||
// Input pane
|
||||
var inputPane = panel.GetWidget("INPUT_CONTROLS");
|
||||
inputPane.IsVisible = () => Settings == PanelType.Input;
|
||||
@@ -156,16 +147,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
|
||||
bool ShowColorPicker(DropDownButtonWidget color, PlayerSettings s)
|
||||
{
|
||||
Action<ColorRamp> onSelect = c =>
|
||||
{
|
||||
s.ColorRamp = c;
|
||||
color.RemovePanel();
|
||||
};
|
||||
|
||||
Action<ColorRamp> onChange = c =>
|
||||
{
|
||||
playerPalettePreview.Ramp = c;
|
||||
};
|
||||
Action<ColorRamp> onSelect = c => { s.ColorRamp = c; color.RemovePanel(); };
|
||||
Action<ColorRamp> onChange = c => { playerPalettePreview.Ramp = c; };
|
||||
|
||||
var colorChooser = Game.LoadWidget(world, "COLOR_CHOOSER", null, new WidgetArgs()
|
||||
{
|
||||
@@ -200,7 +183,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ShowMouseScrollDropdown(DropDownButtonWidget dropdown, GameSettings s)
|
||||
{
|
||||
var options = new Dictionary<string, MouseScrollType>()
|
||||
|
||||
@@ -106,8 +106,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
perfgraphCheckbox.IsChecked = () => Game.Settings.Debug.PerfGraph;
|
||||
perfgraphCheckbox.OnClick = () => Game.Settings.Debug.PerfGraph ^= true;
|
||||
|
||||
Game.Settings.Game.MatchTimer = true;
|
||||
|
||||
var checkunsyncedCheckbox = debug.GetWidget<CheckboxWidget>("CHECKUNSYNCED_CHECKBOX");
|
||||
checkunsyncedCheckbox.IsChecked = () => Game.Settings.Debug.SanityCheckUnsyncedCode;
|
||||
checkunsyncedCheckbox.OnClick = () => Game.Settings.Debug.SanityCheckUnsyncedCode ^= true;
|
||||
|
||||
@@ -77,18 +77,10 @@ Container@SETTINGS_PANEL:
|
||||
Height:20
|
||||
Font:Regular
|
||||
Text:Show Performance Graph
|
||||
Checkbox@MATCHTIME_CHECKBOX:
|
||||
Id:MATCHTIME_CHECKBOX
|
||||
X:15
|
||||
Y:180
|
||||
Width:300
|
||||
Height:20
|
||||
Font:Regular
|
||||
Text:Show Match Timer
|
||||
Checkbox@CHECKUNSYNCED_CHECKBOX:
|
||||
Id:CHECKUNSYNCED_CHECKBOX
|
||||
X:15
|
||||
Y:210
|
||||
Y:180
|
||||
Width:300
|
||||
Height:20
|
||||
Font:Regular
|
||||
|
||||
Reference in New Issue
Block a user