Beispiel #1
0
    private void OnOk()
    {
        try
        {
            activeDialog.callback?.Invoke(true, activeDialog.allowInput ? input.text : null);
        }
        catch (Exception e)
        {
            Debug.LogException(e);
        }
        finally
        {
            activeDialog = null;
        }

        Hide();
    }
Beispiel #2
0
    private void OnCancel()
    {
        try
        {
            activeDialog.callback?.Invoke(false, null);
        }
        catch (Exception e)
        {
            Debug.LogException(e);
        }
        finally
        {
            activeDialog = null;
        }

        Hide();
    }
Beispiel #3
0
    private void ProcessQueue()
    {
        if (queue.Count == 0 || canvas.enabled)
        {
            return;
        }

        activeDialog = queue.Dequeue();
        label.text   = activeDialog.text;
        input.gameObject.SetActive(activeDialog.allowInput);
        input.text = "";

        canvas.enabled      = true;
        controller.enabled  = false;
        inputSource.enabled = false;
        Cursor.lockState    = CursorLockMode.None;
        Cursor.visible      = true;
    }