Add automated chrome string extractor.
This commit is contained in:
committed by
Matthias Mailänder
parent
1f0e73906e
commit
cbd6b67456
@@ -27,6 +27,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
public Func<string> GetImageCollection;
|
||||
public Func<Sprite> GetSprite;
|
||||
|
||||
[TranslationReference]
|
||||
public string TooltipText;
|
||||
|
||||
readonly Lazy<TooltipContainerWidget> tooltipContainer;
|
||||
@@ -39,7 +40,8 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
GetImageName = () => ImageName;
|
||||
GetImageCollection = () => ImageCollection;
|
||||
GetTooltipText = () => TooltipText;
|
||||
var tooltipCache = new CachedTransform<string, string>(s => !string.IsNullOrEmpty(s) ? TranslationProvider.GetString(s) : "");
|
||||
GetTooltipText = () => tooltipCache.Update(TooltipText);
|
||||
tooltipContainer = Exts.Lazy(() =>
|
||||
Ui.Root.Get<TooltipContainerWidget>(TooltipContainer));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user