Example #1
0
        public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
        {
            this.ClientGetLastMapPathFromServer();

            // there are no brush or any other active tool
            return(null);
        }
Example #2
0
        public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
        {
            var activeTool = new EditorToolAreaSelectorActive();

            this.settings.ViewModelLocationSettings = activeTool.LocationSettingsViewModel;
            this.settings.ToolTerrain = this;
            return(activeTool);
        }
Example #3
0
        public override ViewModelEditorToolItem CreateItemViewModel(BaseEditorToolItem item)
        {
            var entry     = (EditorToolStaticObjectsItem)item;
            var viewModel = new ViewModelEditorToolItemStaticObject(entry);

            this.viewModelsDictionary[entry.ProtoStaticObject]
                = new WeakReference <ViewModelEditorToolItemStaticObject>(viewModel);
            return(viewModel);
        }
Example #4
0
        public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
        {
            var tool = new EditorActiveToolZones(
                onSelected: this.ClientOnPaintZone,
                onPointedZonesChanged: this.ClientOnPointedZonesChanged);

            this.SetupActiveTool(tool);
            return(tool);
        }
        public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
        {
            var tool = new EditorActiveToolTileBrush(
                onSelected: this.ClientPlaceAt,
                validateCallback: tilePositions => this.ValidateCallback(tilePositions, out var notUsed),
                isRepeatOnMove: false);

            tool.SetCustomBrush(
                Vector2Int.Zero,
                new Vector2Int(1, 0));
            return(tool);
        }
        public static void SetActiveTool(BaseEditorTool tool, BaseEditorToolItem item)
        {
            if (activeTool is not null)
            {
                activeTool.Dispose();
                activeTool = null;
            }

            if (tool is null)
            {
                return;
            }

            activeTool = tool.Activate(item);
        }
 public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     // there are no brush or any other active tool
     return(null);
 }
 public ViewModelEditorToolItem(BaseEditorToolItem toolItem)
 {
     this.ToolItem = toolItem;
 }
Example #9
0
 public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     return(new EditorToolPointerActive());
 }
Example #10
0
 public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     return(new EditorToolPointerActive(this.ClientDeleteCallback));
 }
Example #11
0
 public sealed override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     return(this.Activate((TItem)item));
 }
Example #12
0
 public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     return(new EditorToolTerrainCloneActive());
 }