Ejemplo n.º 1
0
 public void Run(string s)
 {
     // load dialog and run, such as "Assets/Dialog/control_test.yaml"
     DialogRunner.GetInstance().StopDialog();
     DialogRunner.Run(this, s);
     Clear();
 }
Ejemplo n.º 2
0
 void Awake()
 {
     instance          = this;
     _replicaText.text = "";
     _animator         = GetComponent <Animator>();
     _blockingPanel.SetActive(false);
     _mainCanvas.GetComponent <CanvasGroup>().alpha = 0f;
 }
Ejemplo n.º 3
0
    // should never try to run dialog when one is already in progress.
    // check DialogRunner.Active before trying to run dialog.
    // for now, also throw an error
    public static void Run(IDialogUI ui, string path)
    {
        DialogRunner runner = GetInstance();

        if (runner.dialog != null)
        {
            throw new DialogError("Another dialog session is already open.");
        }
        runner.dialog = runner.StartCoroutine(runner.RunDialog(ui, path));
    }
Ejemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     if (nextPressed)
     {
         if (textScroll != null)
         {
             StopCoroutine(textScroll);
             textScroll = null;
             chatbox.SetText(text);
         }
         DialogRunner.RequestAdvance();
     }
     nextPressed = false;
 }
Ejemplo n.º 5
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object objValue)
        {
            if (provider != null && context != null)
            {
                var serviceProvider = context.Container as IServiceProvider;
                if (serviceProvider == null)
                {
                    var componentSite = (context.Instance as IComponent)?.Site;
                    if (componentSite == null)
                    {
                        return(objValue);
                    }
                    serviceProvider = componentSite;
                }

                var rootReport = (DesignerExtensions.GetService <IDesignerHost>(serviceProvider).RootComponent as XRControl)?.RootReport;
                if (rootReport == null)
                {
                    return(objValue);
                }

                var dataContainer = context.Instance as IDataContainer;
                if (dataContainer == null)
                {
                    return(objValue);
                }

                var form = new FilterStringEditorForm(provider, dataContainer.GetEffectiveDataSource(), dataContainer.DataMember, rootReport.Parameters, rootReport)
                {
                    FilterString = (string)objValue
                };
                if (DialogRunner.ShowDialog(form, provider) != DialogResult.Cancel)
                {
                    objValue = form.FilterString;
                }
            }
            return(objValue);
        }
Ejemplo n.º 6
0
        protected override void Initialize()
        {
            Engine.ContentManager = this.Content;
            Engine.Graphics = this.graphics;
            Engine.Project = this;
            Engine.DialogRunner = new DialogRunner();

            base.Initialize();
        }
Ejemplo n.º 7
0
 private void Awake()
 {
     runner  = new DialogRunner(dialog, controls);
     trigger = new Trigger(() => runner.StartDialog(), ShouldTriggerDialog);
 }
Ejemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     flags = DialogRunner.GetInstance().Flags;
 }