Beispiel #1
0
        /// <summary>
        /// 表示を設定します
        /// </summary>
        protected override void DoSetDisp(object creator)
        {
            var tabIndex  = m_selectedTabIndex.Value;
            var isReverse = m_isSort.Value;

            var data = new ListCreateData
                       (
                debugMenuScene: DebugMenuScene,
                gameObject: gameObject,
                target: this,
                searchFieldUI: m_searchFieldUI,
                tabIndex: tabIndex,
                isReverse: isReverse
                       );

            m_creator = creator as IListCreator <ActionData>;
            m_creator.Create(data);

            m_sortButtonUI.SetDisp(isReverse);
            m_tabButtonUIList.SetDisp(tabIndex, m_creator.TabNameList);
            m_optionButtonUIList.SetDisp(m_creator.OptionActionList);
            m_view.SetDisp(m_creator);
            m_emptyTextUI.SetActive(m_creator.IsEmpty);

            m_optionButtonUIList.mOnComplete = optionData => OpenToastUI($"{optionData.Text} 完了");

            m_view.mOnComplete = (elemData, elemIndex) => OpenToastUI($"{elemData.Text} 完了");
        }
Beispiel #2
0
        /// <summary>
        /// 表示を設定します
        /// </summary>
        protected override void DoSetDisp(object creator)
        {
            var tabIndex  = m_selectedTabIndex.Value;
            var isReverse = m_isSort.Value;

            var data = new ListCreateData
                       (
                debugMenuScene: DebugMenuScene,
                gameObject: gameObject,
                target: this,
                searchFieldUI: m_searchFieldUI,
                tabIndex: tabIndex,
                isReverse: isReverse
                       );

            m_creator = creator as IListCreator <CommandData>;
            m_creator.Create(data);

            m_sortButtonUI.SetDisp(isReverse);
            m_tabButtonUIList.SetDisp(tabIndex, m_creator.TabNameList);
            m_optionButtonUIList.SetDisp(m_creator.OptionActionList);
            m_view.SetDisp(m_creator);
            m_emptyTextUI.SetActive(m_creator.IsEmpty);

            m_optionButtonUIList.mOnComplete = optionData => OpenToastUI($"{optionData.m_text} 完了");

            m_view.mOnComplete = (elemData, elemIndex) =>
            {
                var text = elemData.m_getText();

                var isInput  = elemIndex == 0;
                var isToggle = elemIndex == 1;

                if (isInput)
                {
                    OpenToastUI($"[{text}] [送信] 完了");
                }
                else if (isToggle)
                {
                    var isOn   = elemData.m_toggleActionData.m_getter();
                    var result = isOn ? "オン" : "オフ";
                    OpenToastUI($"[{text}] [{result}] 完了");
                }
                else
                {
                    OpenToastUI($"[{text}] [{elemData.m_actionDataList[ elemIndex - 2 ].m_text}] 完了");
                }
            };
        }