private void TestFromLocation() { ToolCursor = new SpriteCursor(_playerSprite); _toolBehavior = new TestLocationToolBehavior(); ActiveIcon = null; if (ToolChanged != null) { ToolChanged(this, new ToolChangedEventArgs(_toolBehavior)); } }
private void ChangeTool(object toolParam) { switch (toolParam.ToString()) { case "Hand": ToolCursor = new StandardToolCursor("hand.cur"); _toolBehavior = new LayoutToolBehavior(); ActiveIcon = "cursor"; break; case "VSplit": ToolCursor = new StandardToolCursor("vsplit.cur"); _toolBehavior = new CleaveScreenVerticalToolBehavior(); ActiveIcon = "cleave"; break; case "Start": ToolCursor = new SpriteCursor(_playerSprite, 8, 1); _toolBehavior = new StartPointToolBehavior(8, 1); ActiveIcon = "start"; break; case "Continue": ToolCursor = new SpriteCursor(_playerSprite); _toolBehavior = new ContinuePointToolBehavior(); ActiveIcon = "continue"; break; } if (ToolChanged != null) { ToolChanged(this, new ToolChangedEventArgs(_toolBehavior)); } }