示例#1
0
    public static string[] FindNameOfWidgetById(int widgetId)
    {
        UIWidgetTable uIWidgetTable = DataReader <UIWidgetTable> .Get(widgetId);

        if (uIWidgetTable != null && !string.IsNullOrEmpty(uIWidgetTable.widgetName))
        {
            return(uIWidgetTable.widgetName.Split(";".ToCharArray()));
        }
        return(null);
    }
示例#2
0
    public static string FindNameOfUIByWidget(int widgetId)
    {
        UIWidgetTable uIWidgetTable = DataReader <UIWidgetTable> .Get(widgetId);

        if (uIWidgetTable != null)
        {
            if (uIWidgetTable.uiId > 0)
            {
                return(WidgetSystem.FindNameOfUIById(uIWidgetTable.uiId));
            }
            Debug.LogError("GameData.UIWidgetTable no uiId, widgetId = " + widgetId);
        }
        return(string.Empty);
    }
示例#3
0
    public static int GetAudioId(string uiName, string widgetName)
    {
        int result = -1;

        for (int i = 0; i < AudioIdManager.Audio2UIs.get_Count(); i++)
        {
            Audio2UI audio2UI = AudioIdManager.Audio2UIs.get_Item(i);
            if (!string.IsNullOrEmpty(uiName) && audio2UI.widgetId > 0)
            {
                UIWidgetTable uIWidgetTable = DataReader <UIWidgetTable> .Get(audio2UI.widgetId);

                if (uIWidgetTable != null)
                {
                    UINameTable uINameTable = DataReader <UINameTable> .Get(uIWidgetTable.uiId);

                    if (uINameTable != null && uINameTable.name.Equals(uiName) && uIWidgetTable.widgetName.Equals(widgetName))
                    {
                        result = audio2UI.audioId;
                    }
                }
            }
        }
        return(result);
    }