add a new menu item to setup default players in editor
This commit is contained in:
12
OpenRA.Editor/Form1.Designer.cs
generated
12
OpenRA.Editor/Form1.Designer.cs
generated
@@ -80,6 +80,7 @@ namespace OpenRA.Editor
|
|||||||
this.toolStripStatusLabelFiller = new System.Windows.Forms.ToolStripStatusLabel();
|
this.toolStripStatusLabelFiller = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.toolStripStatusLabelMousePosition = new System.Windows.Forms.ToolStripStatusLabel();
|
this.toolStripStatusLabelMousePosition = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.fixOpenAreasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.fixOpenAreasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.setupDefaultPlayersMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.splitContainer1.Panel1.SuspendLayout();
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
this.splitContainer1.Panel2.SuspendLayout();
|
this.splitContainer1.Panel2.SuspendLayout();
|
||||||
this.splitContainer1.SuspendLayout();
|
this.splitContainer1.SuspendLayout();
|
||||||
@@ -397,7 +398,8 @@ namespace OpenRA.Editor
|
|||||||
this.resizeToolStripMenuItem,
|
this.resizeToolStripMenuItem,
|
||||||
this.showActorNamesToolStripMenuItem,
|
this.showActorNamesToolStripMenuItem,
|
||||||
this.showGridToolStripMenuItem,
|
this.showGridToolStripMenuItem,
|
||||||
this.fixOpenAreasToolStripMenuItem});
|
this.fixOpenAreasToolStripMenuItem,
|
||||||
|
this.setupDefaultPlayersMenuItem});
|
||||||
this.mapToolStripMenuItem.Name = "mapToolStripMenuItem";
|
this.mapToolStripMenuItem.Name = "mapToolStripMenuItem";
|
||||||
this.mapToolStripMenuItem.Size = new System.Drawing.Size(43, 23);
|
this.mapToolStripMenuItem.Size = new System.Drawing.Size(43, 23);
|
||||||
this.mapToolStripMenuItem.Text = "&Map";
|
this.mapToolStripMenuItem.Text = "&Map";
|
||||||
@@ -479,6 +481,13 @@ namespace OpenRA.Editor
|
|||||||
this.fixOpenAreasToolStripMenuItem.Text = "&Fix Open Areas";
|
this.fixOpenAreasToolStripMenuItem.Text = "&Fix Open Areas";
|
||||||
this.fixOpenAreasToolStripMenuItem.Click += new System.EventHandler(this.FixOpenAreas);
|
this.fixOpenAreasToolStripMenuItem.Click += new System.EventHandler(this.FixOpenAreas);
|
||||||
//
|
//
|
||||||
|
// setupDefaultPlayersMenuItem
|
||||||
|
//
|
||||||
|
this.setupDefaultPlayersMenuItem.Name = "setupDefaultPlayersMenuItem";
|
||||||
|
this.setupDefaultPlayersMenuItem.Size = new System.Drawing.Size(175, 22);
|
||||||
|
this.setupDefaultPlayersMenuItem.Text = "&Setup Default Players";
|
||||||
|
this.setupDefaultPlayersMenuItem.Click += new System.EventHandler(this.SetupDefaultPlayers);
|
||||||
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@@ -561,6 +570,7 @@ namespace OpenRA.Editor
|
|||||||
private System.Windows.Forms.ToolStripMenuItem showActorNamesToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem showActorNamesToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem showGridToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem showGridToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem fixOpenAreasToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem fixOpenAreasToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem setupDefaultPlayersMenuItem;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -447,5 +447,14 @@ namespace OpenRA.Editor
|
|||||||
surface1.Chunks.Clear();
|
surface1.Chunks.Clear();
|
||||||
surface1.Invalidate();
|
surface1.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetupDefaultPlayers(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
dirty = true;
|
||||||
|
surface1.Map.MakeDefaultPlayers();
|
||||||
|
|
||||||
|
surface1.Chunks.Clear();
|
||||||
|
surface1.Invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ namespace OpenRA.FileFormats
|
|||||||
public string[] Enemies = {};
|
public string[] Enemies = {};
|
||||||
|
|
||||||
public PlayerReference() {}
|
public PlayerReference() {}
|
||||||
public PlayerReference(MiniYaml my)
|
public PlayerReference(MiniYaml my) { FieldLoader.Load(this, my); }
|
||||||
{
|
|
||||||
FieldLoader.Load(this, my);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user