Merge pull request #11211 from Mailaender/debugcustomterrain

Added a CustomTerrainDebugOverlay
This commit is contained in:
reaperrr
2016-06-12 11:53:47 +02:00
committed by GitHub
13 changed files with 122 additions and 14 deletions

View File

@@ -134,6 +134,18 @@ namespace OpenRA.Mods.Common.Widgets.Logic
showActorTagsCheckbox.IsChecked = () => devTrait.ShowActorTags;
showActorTagsCheckbox.OnClick = () => devTrait.ShowActorTags ^= true;
}
var showCustomTerrainCheckbox = widget.GetOrNull<CheckboxWidget>("SHOW_CUSTOMTERRAIN_OVERLAY");
if (showCustomTerrainCheckbox != null)
{
var customTerrainDebugTrait = world.WorldActor.TraitOrDefault<CustomTerrainDebugOverlay>();
showCustomTerrainCheckbox.Disabled = customTerrainDebugTrait == null;
if (customTerrainDebugTrait != null)
{
showCustomTerrainCheckbox.IsChecked = () => customTerrainDebugTrait.Enabled;
showCustomTerrainCheckbox.OnClick = () => customTerrainDebugTrait.Enabled ^= true;
}
}
}
public void Order(World world, string order)