fix naming of event handlers in editor

This commit is contained in:
Chris Forbes
2011-12-09 22:26:55 +13:00
parent 6bac11f071
commit 6c027372ab
2 changed files with 4 additions and 4 deletions

View File

@@ -225,8 +225,8 @@ namespace OpenRA.Editor
this.actorOwnerChooser.Name = "actorOwnerChooser"; this.actorOwnerChooser.Name = "actorOwnerChooser";
this.actorOwnerChooser.Size = new System.Drawing.Size(184, 21); this.actorOwnerChooser.Size = new System.Drawing.Size(184, 21);
this.actorOwnerChooser.TabIndex = 3; this.actorOwnerChooser.TabIndex = 3;
this.actorOwnerChooser.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.onDrawPlayerItem); this.actorOwnerChooser.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.DrawPlayerListItem);
this.actorOwnerChooser.SelectionChangeCommitted += new System.EventHandler(this.onSelectOwner); this.actorOwnerChooser.SelectionChangeCommitted += new System.EventHandler(this.OnSelectedPlayerChanged);
// //
// tabPage3 // tabPage3
// //

View File

@@ -499,7 +499,7 @@ namespace OpenRA.Editor
PopulateActorOwnerChooser(); PopulateActorOwnerChooser();
} }
void onDrawPlayerItem(object sender, DrawItemEventArgs e) void DrawPlayerListItem(object sender, DrawItemEventArgs e)
{ {
// color block // color block
var player = e.Index >= 0 ? (PlayerReference)(sender as ComboBox).Items[e.Index] : null; var player = e.Index >= 0 ? (PlayerReference)(sender as ComboBox).Items[e.Index] : null;
@@ -517,7 +517,7 @@ namespace OpenRA.Editor
e.Graphics.DrawString( player.Name, e.Font, foreBrush, e.Bounds.Left + e.Bounds.Height + 12, e.Bounds.Top ); e.Graphics.DrawString( player.Name, e.Font, foreBrush, e.Bounds.Left + e.Bounds.Height + 12, e.Bounds.Top );
} }
void onSelectOwner(object sender, EventArgs e) void OnSelectedPlayerChanged(object sender, EventArgs e)
{ {
var player = actorOwnerChooser.SelectedItem as PlayerReference; var player = actorOwnerChooser.SelectedItem as PlayerReference;
surface1.NewActorOwner = player.Name; surface1.NewActorOwner = player.Name;