예제 #1
0
    private void AddPaintButton(ScheduleGroup group)
    {
        SchedulePaintButton schedulePaintButton = Util.KInstantiateUI <SchedulePaintButton>(paintButtonPrefab.gameObject, paintButtonContainer, true);

        schedulePaintButton.SetGroup(group, paintStyles, OnPaintButtonClick);
        schedulePaintButton.SetToggle(false);
        paintButtons.Add(schedulePaintButton);
    }
예제 #2
0
 private void OnPaintButtonClick(SchedulePaintButton clicked)
 {
     if ((Object)selectedPaint != (Object)clicked)
     {
         foreach (SchedulePaintButton paintButton in paintButtons)
         {
             paintButton.SetToggle((Object)paintButton == (Object)clicked);
         }
         selectedPaint = clicked;
     }
     else
     {
         clicked.SetToggle(false);
         selectedPaint = null;
     }
 }