Change *VictoryConditions to use customizable objective descriptions

This commit is contained in:
Oliver Brakmann
2015-05-26 11:45:28 +02:00
parent 34f382ec57
commit 4e010bd6e6
3 changed files with 15 additions and 4 deletions

View File

@@ -27,6 +27,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
checkbox.IsChecked = () => lp.WinState != WinState.Undefined;
checkbox.GetCheckType = () => lp.WinState == WinState.Won ?
"checked" : "crossed";
if (lp.HasObjectives)
{
var mo = lp.PlayerActor.Trait<MissionObjectives>();
checkbox.GetText = () => mo.Objectives.First().Description;
}
var statusLabel = widget.Get<LabelWidget>("STATS_STATUS");