Exemple #1
0
 public void Select(SelectableInputEventArgs args)
 {
     if (!_isSelectable)
     {
         return;
     }
     OnSelect?.Invoke(args);
 }
 private void onOtherSelectableClicked(SelectableInputEventArgs args)
 {
     if (_selected != null)
     {
         _selected.Deselect();
     }
     _selected = args.Selectable;
     _selected.Select(args);
 }
 private void onSelectableDoubleSelect(SelectableInputEventArgs args)
 {
     if (args.Selectable.DeselectOnDoubleSelect)
     {
         _selected.Deselect();
         _selected = null;
     }
     if (args.Selectable.SelectAgainOnDoubleSelect)
     {
         _selected = args.Selectable;
         _selected.Select(args);
     }
 }
 private void onSelectableClicked(SelectableInputEventArgs args)
 {
     if (!args.Selectable.IsSelectable)
     {
         return;
     }
     if (_selected == args.Selectable)
     {
         onSelectableDoubleSelect(args);
     }
     else
     {
         onOtherSelectableClicked(args);
     }
 }