Пример #1
0
 void SelectModel(BasicModel model)
 {
     if (!model.isSelected)
     {
         _SelectedModels.Add(model);
         model.isSelected = true;
     }
     _Params.deleteButton.interactable = true;
 }
Пример #2
0
        void UnselectModel(BasicModel model)
        {
            if (model.isSelected)
            {
                _SelectedModels.Remove(model);
                model.isSelected = false;
            }

            // Activate the delete button if at least one item was selected
            _Params.deleteButton.interactable = _SelectedModels.Count > 0;
        }
Пример #3
0
 public void UpdateViews(BasicModel model)
 {
     title.text       = "#" + ItemIndex + " [id:" + model.id + "]";
     background.color = model.color;
 }
Пример #4
0
 void HandleItemDeletion(BasicModel model)
 {
     Debug.Log("Deleted with id: " + model.id);
 }
Пример #5
0
 void UpdateSelectionState(MyCellViewsHolder viewsHolder, BasicModel model)
 {
     viewsHolder.longClickableComponent.gameObject.SetActive(!_SelectionMode); // can be long-clicked only if selection mode is off
     viewsHolder.toggle.gameObject.SetActive(_SelectionMode);                  // can be selected only if selection mode is on
     viewsHolder.toggle.isOn = model.isSelected;
 }