Exemple #1
0
        public override UIScreen Initialize(XMLMainMenu menu)
        {
            Menu = menu;
            HideOnExit();
            var opt = new OptionNodeLR <int>(LocalizedString.Empty, SetIndex, NumOptions.Range().ToArray(), DefaultOption);

            return(new UIScreen(opt
                                .With(hideClass)
                                .SetUpOverride(() => opt.Left())
                                .SetDownOverride(() => opt.Right())
                                .SetConfirmOverride(() => Activate(opt.Value))
                                )
                   .OnPreEnter(() => OnPreEnter(opt.Value))
                   .OnPreExit(OnPreExit)
                   .OnEnter(() => Show(opt.Value, true))
                   .OnExit(HideOnExit));
        }
 void OnDropdownChanged(Dropdown dropdown)
 {
     selected = (NumOptions)dropdown.value;
 }
 private void Awake()
 {
     selected = (NumOptions)PlayerPrefsManager.GetTheme();
 }