Browse Source

Fixed Say Dialog registering a click when Menu option selected

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

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

@ -9,7 +9,7 @@ namespace Fungus
void OnNextLineEvent();
}
public class DialogInput : MonoBehaviour
public class DialogInput : MonoBehaviour
{
public enum ClickMode
{
@ -141,6 +141,16 @@ namespace Fungus
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
if (nextLineInputFlag)
{

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

@ -12,7 +12,7 @@ namespace Fungus
*/
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();
// Called when the Writer starts writing new text

Loading…
Cancel
Save