Allow tools to disable themselves

This commit is contained in:
Gustas
2025-07-21 13:25:30 +03:00
committed by Matthias Mailänder
parent f8921226b8
commit 42181d77a5
10 changed files with 95 additions and 45 deletions

View File

@@ -44,15 +44,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
readonly Widget dropDownSettingTemplate;
[ObjectCreator.UseCtor]
public MapGeneratorToolLogic(Widget widget, World world, WorldRenderer worldRenderer, ModData modData,
IEditorMapGeneratorInfo tool)
public MapGeneratorToolLogic(Widget widget, World world, WorldRenderer worldRenderer, ModData modData, IEditorTool tool)
{
editorActionManager = world.WorldActor.Trait<EditorActionManager>();
this.world = world;
this.worldRenderer = worldRenderer;
this.modData = modData;
generator = tool;
generator = tool.TraitInfo as IEditorMapGeneratorInfo;
settings = generator.GetSettings();
settingsPanel = widget.Get<ScrollPanelWidget>("SETTINGS_PANEL");