remove type-specific functions for ChromeMetrics.Get; use FieldLoader

This commit is contained in:
Chris Forbes
2011-06-17 18:50:23 +12:00
committed by Paul Chote
parent 7095f293ff
commit 3409d8f046
4 changed files with 9 additions and 19 deletions

View File

@@ -30,19 +30,9 @@ namespace OpenRA.Widgets
data[n.Key] = n.Value.Value;
}
public static string GetString(string key)
public static T Get<T>(string key)
{
return data[key];
}
public static int GetInt(string key)
{
return int.Parse(data[key]);
}
public static bool GetBool(string key)
{
return bool.Parse(data[key]);
return (T)FieldLoader.GetValue( key, typeof(T), data[key] );
}
}
}