Fix silly naming conventions

This commit is contained in:
Paul Chote
2010-08-23 22:17:05 +12:00
parent 79ced35010
commit 46d0ce89e9
8 changed files with 32 additions and 32 deletions

View File

@@ -85,14 +85,14 @@ namespace OpenRA.Widgets.Delegates
};
var width = display.GetWidget<TextFieldWidget>("SCREEN_WIDTH");
Game.Settings.WindowedSize.X = (Game.Settings.WindowedSize.X < UserSettings.MinResolution.X)?
UserSettings.MinResolution.X : Game.Settings.WindowedSize.X;
Game.Settings.WindowedSize.X = (Game.Settings.WindowedSize.X < Game.Settings.MinResolution.X)?
Game.Settings.MinResolution.X : Game.Settings.WindowedSize.X;
width.Text = Game.Settings.WindowedSize.X.ToString();
width.OnLoseFocus = () =>
{
try {
var w = int.Parse(width.Text);
if (w > UserSettings.MinResolution.X && w <= Screen.PrimaryScreen.Bounds.Size.Width)
if (w > Game.Settings.MinResolution.X && w <= Screen.PrimaryScreen.Bounds.Size.Width)
Game.Settings.WindowedSize = new int2(w, Game.Settings.WindowedSize.Y);
else
width.Text = Game.Settings.WindowedSize.X.ToString();
@@ -104,14 +104,14 @@ namespace OpenRA.Widgets.Delegates
width.OnEnterKey = () => { width.LoseFocus(); return true; };
var height = display.GetWidget<TextFieldWidget>("SCREEN_HEIGHT");
Game.Settings.WindowedSize.Y = (Game.Settings.WindowedSize.Y < UserSettings.MinResolution.Y)?
UserSettings.MinResolution.Y : Game.Settings.WindowedSize.Y;
Game.Settings.WindowedSize.Y = (Game.Settings.WindowedSize.Y < Game.Settings.MinResolution.Y)?
Game.Settings.MinResolution.Y : Game.Settings.WindowedSize.Y;
height.Text = Game.Settings.WindowedSize.Y.ToString();
height.OnLoseFocus = () =>
{
try {
var h = int.Parse(height.Text);
if (h > UserSettings.MinResolution.Y && h <= Screen.PrimaryScreen.Bounds.Size.Height)
if (h > Game.Settings.MinResolution.Y && h <= Screen.PrimaryScreen.Bounds.Size.Height)
Game.Settings.WindowedSize = new int2(Game.Settings.WindowedSize.X, h);
else
height.Text = Game.Settings.WindowedSize.Y.ToString();