Ejemplo n.º 1
0
 public override void Draw(SpriteBatch batch, Logic.Camera cam)
 {
     base.Draw(batch, cam);
     _worldSpaceMouse = cam.ViewToWorldPosition(new Vector2(_prevMouse.X, _prevMouse.Y));
     selected = -1;
     for (int x = 0; x < _choiceRects.Length; x++)
         if (_choiceRects[x].Contains((int)_worldSpaceMouse.X, (int)_worldSpaceMouse.Y))
             selected = x;
     if (selected >= 0 && selected < _choices.Length)
     {
         Rectangle rect = _choiceRects[selected];
         rect.X -= 2-(int)_rectOffset;
         rect.Width += 4-(int)_rectOffset;
         batch.Draw(_selectRect, rect, Color.Orange);
     }
 }