public void RenderTooltip(DeviceContext deviceContext, Matrix viewMatrix, Matrix projectionMatrix) { int drawX = -(Context.ScreenSize.X >> 1) + _position.X; int drawY = -(Context.ScreenSize.Y >> 1) + _position.Y; Matrix position = Matrix.Translation(drawX, drawY, 0); _rectangle.Render(deviceContext, position, viewMatrix, projectionMatrix); _text.Render(deviceContext, position, viewMatrix, projectionMatrix); }
protected override void Render(DeviceContext deviceContext, Matrix worldMatrix, Matrix viewMatrix, Matrix projectionMatrix) { _plainRectangle.Render(deviceContext, worldMatrix, viewMatrix, projectionMatrix); _text.Render(deviceContext, worldMatrix, viewMatrix, projectionMatrix); }