Exemplo n.º 1
0
        /// <summary>
        /// Draws the scene node
        /// </summary>
        /// <param name="nodeOffset">The offset caused by panning</param>
        public override void Draw(Vector2 nodeOffset)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }

            InitializeNode();

            Rect nodeRect = GetRenderRect(nodeOffset);

            Color color = Color.white;

            GUIContent display = sceneName;

            if (SceneId == SceneManagerController.ANY_SCENE_ID)
            {
                color = SceneManagerResources.AnySceneColor;
            }

            if (IsEntryScene)
            {
                display = new GUIContent(entryText + ":" + Environment.NewLine + sceneName.text);
                color   = SceneManagerResources.EntrySceneColor;
            }

            if (IsActiveScene)
            {
                color = SceneManagerResources.ActiveSceneColor;
            }

            GUIExtensions.BeginColouring(color);
            nodeStyle.Draw(nodeRect, display, true, IsSelected(), true, false);
            GUIExtensions.EndColouring();
        }