Exemplo n.º 1
0
 public WarningDialog(Rectangle bounds, string message, OkayCallback okayCallback, CancelCallback cancelCallback)
     : base(bounds.X, bounds.Y, bounds.Width, bounds.Height, true)
 {
     OnOkay       = okayCallback;
     OnCancel     = cancelCallback;
     exitFunction = Cancel;
     _message     = message;
 }
Exemplo n.º 2
0
        void Start()
        {
            yes.onClick.AddListener(() => YesCallback?.Invoke());
            shade.onClick.AddListener(() => NoCallback?.Invoke());
            no.onClick.AddListener(() => NoCallback?.Invoke());
            okay.onClick.AddListener(() => OkayCallback?.Invoke());
            canvas = GetComponent <Canvas>();

            // enabling here prevents scene getting dirty, Unity autolayout sucks
            fitter.enabled = true;
            layout.enabled = true;
        }