public override void DrawContent(LineBatch lineBatch, SpriteBatch spriteBatch) { base.DrawContent(lineBatch, spriteBatch); lineBatch.Add(_spriteDef.P1, _spriteDef.P2, Color.Green); lineBatch.Add(_spriteDef.P3); lineBatch.Add(_spriteDef.P4); lineBatch.Add(_spriteDef.P1); }
public override void DrawContent(LineBatch lineBatch, SpriteBatch spriteBatch) { if (_mat != null) { spriteBatch.AddSprite(_mat, 0, 0, 0, 0, _mat[TextureUnit.Texture0].Width, _mat[TextureUnit.Texture0].Height); lineBatch.AddBox(0, 0, _mat[TextureUnit.Texture0].Width, _mat[TextureUnit.Texture0].Height, Color.Red); } else { lineBatch.Add(new Vector2(-100, -100), new Vector2(100, 100), Color.Red); lineBatch.Add(new Vector2(100, -100), new Vector2(-100, 100), Color.Red); } }
protected override void OnDrawGui(LineBatch lineBatch) { Color c = Selected ? Color.Orange : Color.White; switch (_handleType) { case HandleType.Box: lineBatch.AddBox(ScreenPos.X - _length / 2.0f, ScreenPos.Y - _length / 2.0f, _length, _length, c); break; case Editors.HandleType.Cross: lineBatch.Add(new Vector2(ScreenPos.X, ScreenPos.Y - _length), new Vector2(ScreenPos.X, ScreenPos.Y + _length), c); lineBatch.Add(new Vector2(ScreenPos.X - _length, ScreenPos.Y), new Vector2(ScreenPos.X + _length, ScreenPos.Y), c); break; } }