Esempio n. 1
0
    void guiInspector()
    {
        rct_inspector = new Rect(position.width - right_inspector_width, top_toolbar_height, right_inspector_width, position.height - top_toolbar_height);
        GUILayout.BeginArea(rct_inspector);

        GUILayout.BeginVertical();
        GUI.color = new Color(0f, 0f, 0f, 0.4f);
        GUI.DrawTexture(new Rect(0, 0, rct_inspector.width, rct_inspector.height), StoryEditorTools.GetWhiteTex());
        GUI.color = new Color(1f, 1f, 1f, 1f);
        for (int idx = 0; idx < m_data.Count; idx++)
        {
            if (m_data[idx].m_is_select)
            {
                m_data[idx].DrawInspectorSpace();
            }
        }
        GUILayout.EndVertical();
        GUILayout.EndArea();
    }
Esempio n. 2
0
    // 背景纹理
    void drawWorkareaBack()
    {
        int rows = Mathf.CeilToInt(rct_work_area.height / item_height);

        for (int i = 1; i < rows; ++i)
        {
            Rect rct = new Rect(0, i * item_height, work_real_width, item_height);
            if (i % 2 == 0)
            {
                GUI.color = new Color(0.2f, 0.2f, 0.2f, 0.2f);
            }
            else
            {
                GUI.color = new Color(0f, 0f, 0f, 0.2f);
            }

            //if (i % 2 == 0)
            //	GUI.color = new Color(0f, 0f, 0.5f, 0.2f);

            GUI.DrawTexture(rct, StoryEditorTools.GetWhiteTex());
            GUI.color = new Color(1f, 1f, 1f, 1f);
        }
    }
Esempio n. 3
0
    void guiLeftToolbar()
    {
        rct_left_toolbar = new Rect(0, top_toolbar_height, left_toolbar_width, position.height);
        GUILayout.BeginArea(rct_left_toolbar);

        GUI.color = new Color(0f, 0f, 0f, 0.4f);
        GUI.DrawTexture(new Rect(0, 0, rct_left_toolbar.width, rct_left_toolbar.height), StoryEditorTools.GetWhiteTex());
        GUI.color = new Color(1f, 1f, 1f, 1f);

        GUI.Label(new Rect(20, 0, rct_left_toolbar.width - 20, item_height), cur_time_string);

        for (int idx = 0; idx < m_data.Count; idx++)
        {
            StoryEditorBase item = m_data[idx];
            if (item.m_is_select)
            {
                GUI.color = new Color(0.75f, 0.75f, 0.75f, 1.0f);
            }

            if (GUI.Button(new Rect(0, item_height * (idx + 1), rct_left_toolbar.width, item_height), item.m_type, EditorStyles.toolbarPopup))
            {
                for (int idy = 0; idy < m_data.Count; idy++)
                {
                    m_data[idy].UnSelect();
                }
                m_data[idx].OnSelect();
            }
            GUI.color = new Color(1f, 1f, 1f, 1f);
        }

        if (GUI.Button(new Rect(0, item_height * (m_data.Count + 1), rct_left_toolbar.width, item_height), "+", EditorStyles.miniButton))
        {
            is_create_movie_type = true;
        }

        GUILayout.EndArea();
    }