Allow tools to disable themselves
This commit is contained in:
committed by
Matthias Mailänder
parent
f8921226b8
commit
42181d77a5
@@ -40,10 +40,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
((ScrollPanelWidget)widget).Layout.AdjustChildren();
|
||||
|
||||
var editCheckbox = widget.Get<CheckboxWidget>("EDIT");
|
||||
editCheckbox.Disabled = !tool.Available;
|
||||
if (!tool.Available)
|
||||
return;
|
||||
|
||||
editCheckbox.IsChecked = () => editorWidget.CurrentBrush is EditorTilingPathBrush;
|
||||
editCheckbox.OnClick = () =>
|
||||
editorWidget.SetBrush(
|
||||
|
||||
Reference in New Issue
Block a user