using LitJson;
using System;
using UnityEditor;
using UnityEngine;
using WS;

public class UIGuideOperateEditor : IOperateEditor
{
    public string Name => "UI交互引导";

    public Type Component => typeof(UIGuideOperateComponent);

    UIGuideOperateData Data;
    public void Dispose()
    {
        
    }

    public void Init(string json)
    {
        Data = string.IsNullOrEmpty(json) ? new UIGuideOperateData() : JsonMapper.ToObject<UIGuideOperateData>(json);
    }

    public void OnGUI()
    {
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("音频名称:", GUILayout.Width(55));
        Data.audioName = EditorGUILayout.TextField(Data.audioName);
        EditorGUILayout.EndHorizontal();

    }

    public string ToData()
    {
        return JsonMapper.ToJson(Data);
    }
}
