Ejemplo n.º 1
0
 void SelectModel(BasicModel model)
 {
     if (!model.isSelected)
     {
         _SelectedModels.Add(model);
         model.isSelected = true;
     }
     _Params.deleteButton.interactable = true;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
 public void UpdateViews(BasicModel model)
 {
     title.text       = "#" + ItemIndex + " [id:" + model.id + "]";
     background.color = model.color;
 }
Ejemplo n.º 4
0
 void HandleItemDeletion(BasicModel model)
 {
     Debug.Log("Deleted with id: " + model.id);
 }
Ejemplo n.º 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;
 }