Пример #1
0
        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);
        }
Пример #2
0
 protected override void Render(DeviceContext deviceContext, Matrix worldMatrix, Matrix viewMatrix, Matrix projectionMatrix)
 {
     _plainRectangle.Render(deviceContext, worldMatrix, viewMatrix, projectionMatrix);
     _text.Render(deviceContext, worldMatrix, viewMatrix, projectionMatrix);
 }