Esempio n. 1
0
        public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
        {
            this.ClientGetLastMapPathFromServer();

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

            this.settings.ViewModelLocationSettings = activeTool.LocationSettingsViewModel;
            this.settings.ToolTerrain = this;
            return(activeTool);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 7
0
 public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     // there are no brush or any other active tool
     return(null);
 }
 public ViewModelEditorToolItem(BaseEditorToolItem toolItem)
 {
     this.ToolItem = toolItem;
 }
Esempio n. 9
0
 public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     return(new EditorToolPointerActive());
 }
Esempio n. 10
0
 public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     return(new EditorToolPointerActive(this.ClientDeleteCallback));
 }
Esempio n. 11
0
 public sealed override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     return(this.Activate((TItem)item));
 }
Esempio n. 12
0
 public override BaseEditorActiveTool Activate(BaseEditorToolItem item)
 {
     return(new EditorToolTerrainCloneActive());
 }