fixes #2866: added ButtonWidget.GetKey as delegate

This commit is contained in:
Sascha Biedermann
2013-03-28 10:03:41 +01:00
parent 37e0a189fb
commit 467002a88b
2 changed files with 10 additions and 4 deletions

View File

@@ -17,7 +17,13 @@ namespace OpenRA.Widgets
{
public class ButtonWidget : Widget
{
public string Key = null;
public Func<ButtonWidget, string> GetKey = _ => null;
public string Key
{
get { return GetKey(this); }
set { GetKey = _ => value; }
}
public string Text = "";
public bool Depressed = false;
public int VisualHeight = ChromeMetrics.Get<int>("ButtonDepth");