DrawButton() public static method

public static DrawButton ( string title, Action onClick ) : void
title string
onClick Action
return void
Exemplo n.º 1
0
    public void DrawButton()
    {
        EditorGUILayout.BeginHorizontal();
        EditorDrawHelper.DrawButton("Add", delegate()
        {
            mTable.NumberOfRows++;
            Show(mExcel);
        });

        EditorDrawHelper.DrawButton("Save", delegate()
        {
            string path = Application.dataPath + "/Test/Test3.xlsx";
            ExcelHelper.SaveExcel(mExcel, path);
            EditorUtility.DisplayDialog("Save Success", path, "ok");
        });
        EditorGUILayout.EndHorizontal();
    }
Exemplo n.º 2
0
    public void DrawButton()
    {
        EditorGUILayout.BeginHorizontal();
        EditorDrawHelper.DrawButton("Add", delegate()
        {
            mTable.NumberOfRows++;
            Show(mExcel);
        });

        EditorDrawHelper.DrawButton("Save", delegate()
        {
            string path = System.IO.Path.Combine(Application.streamingAssetsPath, "Test3.xlsx");
            ExcelHelper.SaveExcel(mExcel, path);
            EditorUtility.DisplayDialog("Save Success", path, "ok");
        });
        EditorGUILayout.EndHorizontal();
    }