public void OnLeftMove(ScreenPoint previousPosition, ScreenPoint currentPosition, ScreenPoint move, GameTime time) { Log.Debug( "OnLeftMove (" + previousPosition.ToString() + "," + currentPosition.ToString() + "," + move.ToString() + ")" ); if (new Bounds(ScreenPoint.Zero(Screen), MouseMoveBounds.Size).Contains(previousPosition)) { Log.Debug( "TitleBounds =" + Vector2.Zero.CreateRectangle(TitleBounds.Size).ToString() + "; previousPosition=" + previousPosition.ToString() ); Bounds.Position = (Bounds.Position + move).Const; } }
/// <summary> /// Erzeugt eine neue Instanz eines ModelMouseHandler-Objekts und ordnet dieser ein IGameScreen-Objekt screen zu, /// sowie eine Spielwelt world. /// </summary> public ModelMouseHandler(IScreen screen, World world) : base(screen, DisplayLayer.None) { World = world; lastMousePosition = ScreenPoint.Zero(screen); }