Esempio n. 1
0
        public override void OnEnter()
        {
            if (listPrefab.Value == null)
            {
                Finish();
                return;
            }

            if (values == null || values.stringValues == null)
            {
                Finish();
                return;
            }

            var items = new Dictionary <string, string>();

            for (int i = 0; i < values.stringValues.Length; i++)
            {
                items.Add(values.stringValues[i], string.Empty);
            }

            var scrollableList = ScrollableList.Create(listPrefab.Value, uiTitle.Value, items);

            scrollableList.ItemSelected += OnScrollableListComplete;
            scrollableList.UIClosed     += OnScrollableListClosed;
        }
Esempio n. 2
0
        public override void OnEnter()
        {
            if (listPrefab.Value == null)
            {
                Finish();
                return;
            }

            if (titles == null)
            {
                Finish();
                return;
            }

            var items = new Dictionary <string, string>();

            for (int i = 0; i < titles.Length; i++)
            {
                string titleStr    = titles[i].Value;
                string subtitleStr = subtitles != null && subtitles[i] != null ? subtitles[i].Value : string.Empty;

                items.Add(titleStr, subtitleStr);
            }

            var scrollableList = ScrollableList.Create(listPrefab.Value, uiTitle.Value, items);

            scrollableList.ItemSelected += OnScrollableListComplete;
            scrollableList.UIClosed     += OnScrollableListClosed;
        }