예제 #1
0
        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;
            }
        }
예제 #2
0
        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;
             * }*/
        }
예제 #3
0
        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;
                }
            }
        }
예제 #4
0
 public TileFillTool(CommandHistory history, MultiTileGridLayer layer, TileSourceType sourceType)
     : base(history, layer, sourceType)
 {
 }
예제 #5
0
 public TileFillTool(CommandHistory history, MultiTileGridLayer layer, TileSourceType sourceType)
     : base(history, layer, sourceType)
 {
 }
예제 #6
0
 public TilePointerTool(CommandHistory history, MultiTileGridLayer layer, TileSourceType mode)
     : this(history, layer)
 {
     _sourceType = mode;
 }
예제 #7
0
 private void TileSelectionChangedHandler(object sender, EventArgs e)
 {
     _sourceType = TileSourceType.Tile;
     SourceChangedCore(TileSourceType.Tile);
 }
예제 #8
0
 private void TileBrushSelectedHandler(object sender, EventArgs e)
 {
     _sourceType = TileSourceType.Brush;
     SourceChangedCore(TileSourceType.Brush);
 }
예제 #9
0
 protected virtual void SourceChangedCore(TileSourceType type)
 {
 }
예제 #10
0
 protected virtual void SourceChangedCore(TileSourceType type)
 {
 }
예제 #11
0
 private void TileBrushSelectedHandler(object sender, EventArgs e)
 {
     _sourceType = TileSourceType.Brush;
     SourceChangedCore(TileSourceType.Brush);
 }
예제 #12
0
 private void TileSelectionChangedHandler(object sender, EventArgs e)
 {
     _sourceType = TileSourceType.Tile;
     SourceChangedCore(TileSourceType.Tile);
 }
예제 #13
0
 public TilePointerTool(CommandHistory history, MultiTileGridLayer layer, TileSourceType mode)
     : this(history, layer)
 {
     _sourceType = mode;
 }