/* * 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; }
void HandlePopupDelegate() { if (popupDelegate != null && Event.current.type == EventType.Repaint) { popupDelegate.Invoke(); popupDelegate = null; } }
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(); } }