示例#1
0
    /*
     * Show Hide PopupComponents (Controllers)
     * */

    public void Show(PopupType type, PopupDelegate deleg)
    {
        YesNoPopupActive(false);
        text.SetText(models[type].msg, 0.2f, 6);
        text.setPosion(models[type].position);
        Show();
        popupdelegate = deleg;
    }
示例#2
0
 void HandlePopupDelegate()
 {
     if (popupDelegate != null && Event.current.type == EventType.Repaint)
     {
         popupDelegate.Invoke();
         popupDelegate = null;
     }
 }
示例#3
0
 void ReceiveFunctionCallback(string function)
 {
     if (function == "Add guide...")
     {
         popupDelegate = OpenGuidePopup;
     }
     if (function == "Clear points")
     {
         canvas.ClearPoints();
     }
     if (function == "Reset grid")
     {
         canvas.Reset();
     }
     if (function == "Toggle guide rulers")
     {
         Prefs.DrawRulers.value = !Prefs.DrawRulers.value;
     }
     if (function == "Clear guides")
     {
         IconCanvasGuide.ClearAllGuides();
     }
 }