Ejemplo n.º 1
0
        private void OnGUI()
        {
            Rect windowRect = new Rect(0, 0, position.width, position.height);

            GUI.DrawTexture(windowRect, TextureGen.GenPlainTexture(Color.grey));

            PanelManager.Render(windowRect);

            // Repaint required by PanelManager animations
            Repaint();
        }
        private void RenderPanel(Rect panelRect, PanelBase panel)
        {
            Color?backgroundColor = panel.GetBackgroundColor();

            if (backgroundColor.HasValue)
            {
                Texture panelCol = TextureGen.GenPlainTexture(backgroundColor.Value);
                GUI.DrawTexture(panelRect, panelCol);
            }

            panel.Render(panelRect);
        }