static bool Prefix(SelectableCell selectableCell, SelectableCell.TransitionType transitionType, object changeOwner, ref int ____selectedCellNumber, Action <SegmentedControl, int> ___didSelectCellEvent, Dictionary <int, Action <int> > ____callbacks, SegmentedControl __instance)
 {
     if (____selectedCellNumber == -1)
     {
         SegmentedControlCell segmentedControlCell = (SegmentedControlCell)selectableCell;
         ____selectedCellNumber = segmentedControlCell.cellNumber;
         ___didSelectCellEvent?.Invoke(__instance, segmentedControlCell.cellNumber);
         if (____callbacks.TryGetValue(segmentedControlCell.cellNumber, out Action <int> value))
         {
             value?.Invoke(segmentedControlCell.cellNumber);
         }
         return(false);
     }
     return(true);
 }
Beispiel #2
0
 private void OnHighlightDidChange(SelectableCell cell, SelectableCell.TransitionType transition)
 {
     RefreshBackground();
 }
Beispiel #3
0
 private void OnSelectionDidChange(SelectableCell cell, SelectableCell.TransitionType transition, object _)
 {
     RefreshBackground();
     RefreshContent();
 }
Beispiel #4
0
 private void OnSelectionDidChange(SelectableCell cell, SelectableCell.TransitionType transition, object _)
 {
     UpdateCellBackground();
 }
 private void OnHighlightDidChange(SelectableCell cell, SelectableCell.TransitionType transition)
 {
 }