示例#1
0
        private void OnCellSelect(TableView view, int row) //Change what happens on cell select.
        {
            SettingsInfo info = null;

            if (row > 0 && row < NumberOfCells() - 2)
            {
                info = counterInfos[row - 1];
            }
            if (row == 0)
            {
                CountersPlusEditViewController.ShowMainSettings();
            }
            else if (row == NumberOfCells() - 1)
            {
                CountersPlusEditViewController.ShowDonators();
            }
            else if (row == NumberOfCells() - 2)
            {
                CountersPlusEditViewController.ShowContributors();
            }
            else
            {
                CountersPlusEditViewController.UpdateSettings(info.Model, info);
            }
        }
示例#2
0
 protected override void DidActivate(bool firstActivation, ActivationType activationType)
 {
     base.DidActivate(firstActivation, activationType);
     Instance = this;
     rect     = rectTransform;
     if (!firstActivation && SelectedConfigModel != null)
     {
         UpdateSettings(SelectedConfigModel);
     }
     else if (!firstActivation && wasInMainSettingsMenu)
     {
         ShowMainSettings();
     }
 }
 protected override void DidActivate(bool firstActivation, ActivationType activationType)
 {
     rect = rectTransform;
     if (firstActivation)
     {
         Instance = this;
         CreateFiller();
     }
     else
     {
         if (SelectedConfigModel != null)
         {
             UpdateSettings(SelectedConfigModel, SelectedSettingsInfo);
         }
         else
         {
             CreateFiller();
         }
     }
 }