Example #1
0
 public static Toggle GetSingleActiveToggle(this ToggleGroup group)
 {
     foreach (Toggle toggle in group.ActiveToggles()) {
         if (toggle.isOn) {
             return toggle;
         }
     }
     return null;
 }
Example #2
0
 /**************************************************************************************************/
 /*!
  *    \fn      public static Toggle GetActive(this ToggleGroup aGroup)
  *             ToggleGroup から選択中の Toggle を取得
  *    \param   aGroup : ToggleGroup
  *    \return  選択中の Toggle
  *    \date    2014.12.26(Fri)
  *    \author  [email protected]
  */
 /**************************************************************************************************/
 public static Toggle GetActive(this ToggleGroup aGroup) {
   return aGroup.ActiveToggles().FirstOrDefault();
 }
 public static Toggle GetActiveToggle(this ToggleGroup tg)
 {
     return tg.ActiveToggles ().FirstOrDefault();
 }