protected override void SourceChangedCore(TileSourceType type) { ClearPreviewMarker(); _activeBrush = null; if (type == TileSourceType.Brush) _activeBrush = ActiveBrush; if (Info != null) { if (type == TileSourceType.Tile && ActiveTile != null) Info.InfoString = "Source: Tile " + ActiveTile.Uid; else if (type == TileSourceType.Brush && ActiveBrush != null) Info.InfoString = "Source: Brush " + ActiveBrush.Name; } }
private void TileBrushSelectedHandler(object sender, EventArgs e) { _sourceType = TileSourceType.Brush; List <CommandKey> filter = new List <CommandKey> { CommandKey.TileToolErase, CommandKey.TileToolSelect, }; if (filter.Contains(CommandManager.SelectedCommand(CommandToggleGroup.TileTool))) { CommandManager.Perform(CommandKey.TileToolDraw); } /*switch (CommandManager.SelectedCommand(CommandToggleGroup.TileTool)) { * case CommandKey.TileToolErase: * case CommandKey.TileToolSelect: * CommandManager.Perform(CommandKey.TileToolDraw); * break; * }*/ }
protected override void SourceChangedCore(TileSourceType type) { ClearPreviewMarker(); _activeBrush = null; if (type == TileSourceType.Brush) { _activeBrush = ActiveBrush; } if (Info != null) { if (type == TileSourceType.Tile && ActiveTile != null) { Info.InfoString = "Source: Tile " + ActiveTile.Uid; } else if (type == TileSourceType.Brush && ActiveBrush != null) { Info.InfoString = "Source: Brush " + ActiveBrush.Name; } } }
public TileFillTool(CommandHistory history, MultiTileGridLayer layer, TileSourceType sourceType) : base(history, layer, sourceType) { }
public TilePointerTool(CommandHistory history, MultiTileGridLayer layer, TileSourceType mode) : this(history, layer) { _sourceType = mode; }
private void TileSelectionChangedHandler(object sender, EventArgs e) { _sourceType = TileSourceType.Tile; SourceChangedCore(TileSourceType.Tile); }
private void TileBrushSelectedHandler(object sender, EventArgs e) { _sourceType = TileSourceType.Brush; SourceChangedCore(TileSourceType.Brush); }
protected virtual void SourceChangedCore(TileSourceType type) { }