Present() public static method

public static Present ( ) : void
return void
Exemplo n.º 1
0
 public override void Render(float timePassed)
 {
     if (!Dimmed)
     {
         if (GUIGraphicsContext.Overlay != _isOverlayAllowed)
         {
             GUIGraphicsContext.Overlay = _parentWin.IsOverlayAllowed = _isOverlayAllowed;
         }
         _imageFocused.Render(timePassed);
         GUIFontManager.Present();
     }
     else
     {
         _imageNonFocused.Render(timePassed);
     }
     base.Render(timePassed);
 }
Exemplo n.º 2
0
        public static bool Render(float timePassed, GUILayers layers)
        {
            bool uiVisible = false;

            if (GUIGraphicsContext.BlankScreen)
            {
                return(false);
            }
            int videoLayer = (int)LayerType.Video;

            if (GUIGraphicsContext.ShowBackground == false)
            {
                if (_layers[videoLayer] != null)
                {
                    if (_layers[videoLayer].ShouldRenderLayer())
                    {
                        _layers[videoLayer].RenderLayer(timePassed);
                        GUIFontManager.Present();
                    }
                }
            }

            List <int> layerCount = new List <int>();
            int        startLayer = 0;
            int        endLayer   = MAX_LAYERS;

            if (layers == GUILayers.under)
            {
                endLayer = videoLayer - 1;
            }
            else if (layers == GUILayers.over)
            {
                startLayer = videoLayer + 1;
            }

            for (int i = startLayer; i < endLayer; ++i)
            {
                if (_layers[i] != null)
                {
                    if (_layers[i].ShouldRenderLayer())
                    {
                        if (GUIGraphicsContext.ShowBackground == false && i == videoLayer)
                        {
                            continue;
                        }
                        _layers[i].RenderLayer(timePassed);
                        GUIFontManager.Present();

                        if (videoLayer != i)
                        {
                            uiVisible = true;
                        }
                        if (!layerCount.Contains(i))
                        {
                            layerCount.Add(i);
                        }
                    }
                }
            }

            // For madVR, first check along all layers to inform that UI is displaying
            // Check for madVR when GUI/OSD/Dialog is displayed, we should go to latency mode
            if (GUIGraphicsContext.VideoRenderer == GUIGraphicsContext.VideoRendererType.madVR &&
                GUIGraphicsContext.InVmr9Render)
            {
                for (var i = 0; i < MAX_LAYERS; ++i)
                {
                    if (_layers[i] == null)
                    {
                        continue;
                    }
                    GetValue(layerCount, i);
                }

                foreach (var layer in from layer in layerCount where _layers[layer] != null where _layers[layer].ShouldRenderLayer() where videoLayer != layer select layer)
                {
                    uiVisible = true;
                }
            }
            return(uiVisible);
        }