Пример #1
0
        public static HeatmapRendererInspector Init(Heatmapper heatmapper, HeatmapDataProcessor processor)
        {
            var inspector = new HeatmapRendererInspector();

            inspector.m_Heatmapper = heatmapper;
            return(inspector);
        }
 public static HeatmapRendererInspector Init(Heatmapper heatmapper)
 {
     var inspector = new HeatmapRendererInspector();
     inspector.m_Heatmapper = heatmapper;
     return inspector;
 }
Пример #3
0
    void OnGUI()
    {
        GUILayout.BeginVertical("box");
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Reset"))
        {
            SystemReset();
        }
        if (GUILayout.Button("Documentation"))
        {
            Application.OpenURL("https://bitbucket.org/strangeioc/heatmaps/wiki/Home");
        }
        if (GUILayout.Button("Purge"))
        {
            PurgeData();
        }
        GUILayout.EndHorizontal();
        GUILayout.EndVertical();

        GUILayout.BeginVertical("box");
        if (m_AggregationView == null)
        {
            m_AggregationView = AggregationInspector.Init(m_EventClient, m_Aggregator);
        }
        m_ShowAggregate = EditorGUI.Foldout(EditorGUILayout.GetControlRect(), m_ShowAggregate, "Aggregate Events", true);
        if (m_ShowAggregate)
        {
            m_AggregationView.OnGUI();
            GUILayout.BeginHorizontal();

            m_LocalOnly = GUILayout.Toggle(m_LocalOnly, new GUIContent("Local only", "If checked, don't attempt to download raw data from the server."));
            string fetchButtonText = m_LocalOnly ? "Process" : "Fetch and Process";
            if (GUILayout.Button(fetchButtonText))
            {
                SystemProcess();
            }
            GUILayout.EndHorizontal();
        }
        GUILayout.EndVertical();

        GUILayout.BeginVertical("box");
        if (m_ParserView == null)
        {
            m_ParserView = HeatmapDataParserInspector.Init(OnPointData);
        }
        if (m_RenderView == null)
        {
            m_RenderView = HeatmapRendererInspector.Init(this);
        }

        m_ShowRender = EditorGUI.Foldout(EditorGUILayout.GetControlRect(), m_ShowRender, "Render", true);
        if (m_ShowRender && m_ParserView != null)
        {
            m_ParserView.OnGUI();
            m_RenderView.OnGUI();
        }

        if (m_HeatMapInstance)
        {
            m_RenderView.SetGameObject(m_HeatMapInstance);
        }
        GUILayout.EndVertical();
    }