Browse Source

Fixed Say Dialog registering a click when Menu option selected

master
chrisgregan 9 years ago
parent
commit
eaa7b0eafa
  1. 10
      Assets/Fungus/Narrative/Scripts/DialogInput.cs
  2. 2
      Assets/Fungus/UI/Scripts/Writer.cs

10
Assets/Fungus/Narrative/Scripts/DialogInput.cs

@ -141,6 +141,16 @@ namespace Fungus
ignoreClickTimer = Mathf.Max (ignoreClickTimer - Time.deltaTime, 0f); ignoreClickTimer = Mathf.Max (ignoreClickTimer - Time.deltaTime, 0f);
} }
// Ignore input events if a Menu is being displayed
if (MenuDialog.activeMenuDialog != null)
{
if (MenuDialog.activeMenuDialog.gameObject.activeSelf)
{
dialogClickedFlag = false;
nextLineInputFlag = false;
}
}
// Tell any listeners to move to the next line // Tell any listeners to move to the next line
if (nextLineInputFlag) if (nextLineInputFlag)
{ {

2
Assets/Fungus/UI/Scripts/Writer.cs

@ -12,7 +12,7 @@ namespace Fungus
*/ */
public interface IWriterListener public interface IWriterListener
{ {
// Called when a user input event (e.g. a click) has been received // Called when a user input event (e.g. a click) has been handled by the Writer
void OnInput(); void OnInput();
// Called when the Writer starts writing new text // Called when the Writer starts writing new text

Loading…
Cancel
Save