fix crashy behavior in TextFieldWidget

This commit is contained in:
Chris Forbes
2011-05-16 21:54:03 +12:00
committed by Paul Chote
parent a96b1ce01c
commit aa772db9a7
5 changed files with 31 additions and 34 deletions

View File

@@ -8,21 +8,20 @@
*/
#endregion
using System;
using System.Drawing;
using OpenRA.Graphics;
namespace OpenRA.Widgets
{
public class PasswordFieldWidget : TextFieldWidget
{
public PasswordFieldWidget() : base() {}
protected PasswordFieldWidget(PasswordFieldWidget widget) : base(widget) {}
// TODO: Mouse interaction is wrong with this.
public override void DrawInner()
{
DrawWithString(new string('*', Text.Length));
}
public override Widget Clone() { return new PasswordFieldWidget(this); }
}
}