internal void SelectBrush(MultiTileBrush multiTileBrush) { Tool = new TileBrushToolBehavior(multiTileBrush); ToolCursor = new MultiTileCursor(multiTileBrush); if (ToolChanged != null) { ToolChanged(this, new ToolChangedEventArgs(Tool)); } }
private void UpdateCursor() { if (_currentCursor != null) { _currentCursor.Dispose(); } if (ToolProvider != null && ToolProvider.ToolCursor != null) { _currentCursor = ToolProvider.ToolCursor; ToolProvider.ToolCursor.ApplyCursorTo(this.scrollContainer); } else { this.Cursor = Cursors.Arrow; this.scrollContainer.Cursor = this.Cursor; } }
private void UpdateTool(object toolParam = null) { switch (toolParam.ToString()) { case "Hand": _toolCursor = new StandardToolCursor("hand.cur"); _toolBehavior = null; ActiveIcon = "cursor"; break; case "Entity": _toolCursor = new SpriteCursor(SelectedEntity.DefaultSprite, SnapHorizontal ? HorizSnapAmount : 1, SnapVertical ? VertSnapAmount : 1); _toolBehavior = new EntityToolBehavior(SelectedEntity.Entity, SnapHorizontal ? HorizSnapAmount : 1, SnapVertical ? VertSnapAmount : 1); ActiveIcon = ""; break; } if (ToolChanged != null) { ToolChanged(this, new ToolChangedEventArgs(_toolBehavior)); } }