Exemplo n.º 1
0
        public override void ButtonPressed(SButton button)
        {
            if (!initialized)
            {
                initialize();
            }

            if (!IsQuestion() && Inputs.IsMenuActivateButton(button))
            {
                bool more = !DialogueFinished();
                (stardewMenu as DialogueBox).receiveLeftClick(0, 0, true);
                ModEntry.GetHelper().Input.Suppress(button);
                if (more)
                {
                    initialize();
                    SpeakCurrentText();
                }
            }
            else if (!IsQuestion() && Inputs.IsMenuEscapeButton(button) && !(TextToSpeech.Speaking() || TextToSpeech.QueuedSpeech()))
            {
                if (stardewMenu.readyToClose())
                {
                    (stardewMenu as DialogueBox).receiveLeftClick(0, 0, true);
                    ModEntry.GetHelper().Input.Suppress(button);
                }
                //TODO else, maybe tts "cannot close"?
            }
            else
            {
                base.ButtonPressed(button);
            }
        }