Example #1
0
    public void DelComponent(ChannelConfig config)
    {
        UI_ConfigComponent component = null;

        if (componentDic.TryGetValue(config.channelId, out component))
        {
            componentDic.Remove(config.channelId);
            component.Close();
            return;
        }
    }
Example #2
0
    public void AddOrRefreshComponent(ChannelConfig config)
    {
        UI_ConfigComponent component = null;

        if (componentDic.TryGetValue(config.channelId, out component))
        {
            component.Init(config);
            return;
        }

        var item = UIManager.instance.CreateComponent <UI_ConfigComponent>(UINames.ConfigComponet, scrollView);

        item.Init(config);
        item.callback = OnBtnClickDetail;
        componentDic[config.channelId] = item;
    }