예제 #1
0
        private void OnGUI()
        {
            float val = (float)EditorApplication.timeSinceStartup % 1f;

            guiCanvas.Find <Horizontal>("top").color = new Color(val, val, val, val);
            guiCanvas.canvasRect = new Rect(Vector2.zero, position.size);
            guiCanvas.OnGUI();
            Repaint();
        }
예제 #2
0
        private void OnGUI()
        {
            FreshView();
            guiCanvas.OnGUI();

            float val = (float)EditorApplication.timeSinceStartup % 1f;

            guiCanvas.Find <Horizontal>("Horizontal").color  = new Color(val, val, val, val);
            guiCanvas.Find <Button>("btn/reset").rotateAngle = ((float)EditorApplication.timeSinceStartup * 20) % 360;
            Repaint();
        }
예제 #3
0
    public bool OnDraw(Vector2 size)
    {
        Event     e     = Event.current;
        EventType eType = e.type;

        Canvas.OnGUI(size, e);
        DrawLinkLins();
        DrawNodes();
        if (DragMode != null)
        {
            DragMode.Draw(this);
        }
        if (e.type != EventType.Used)
        {
            OnEvent(e, size);
        }
        return(e.type == EventType.Used &&
               eType != EventType.Layout &&
               eType != EventType.Repaint &&
               eType != EventType.Used);
    }