Browse Source

Merge pull request #952 from breadnone/DialogInput-fix

nextLineInputFlagWon't Always Be True On Mouse Clicks
master
Steve Halliwell 4 years ago
parent
commit
23e15af36e
  1. 1
      Assets/Fungus/Docs/CHANGELOG.txt
  2. 5
      Assets/Fungus/Scripts/Components/DialogInput.cs
  3. 5
      Assets/Fungus/Scripts/Components/Writer.cs

1
Assets/Fungus/Docs/CHANGELOG.txt

@ -7,6 +7,7 @@ Unreleased
- Add missing VariableDrawer for ObjectVariable. Thanks to CG-Tespy.
- Fix double duplication of blocks in flowchart window. Thanks to ongjinwen.
- Dialog ClickAnywhere not supports ignore click delay. Thanks to breadnone.
- SetNextLineFlag only flags if Dialog is actually active/writing. Thanks to breadnone.
## Changed
- Block will LogError when an exception is caught from a Command being Executed.

5
Assets/Fungus/Scripts/Components/DialogInput.cs

@ -84,7 +84,7 @@ namespace Fungus
currentStandaloneInputModule = EventSystem.current.GetComponent<StandaloneInputModule>();
}
if (writer != null && writer.IsWriting)
if (writer != null)
{
if (Input.GetButtonDown(currentStandaloneInputModule.submitButton) ||
(cancelEnabled && Input.GetButton(currentStandaloneInputModule.cancelButton)))
@ -148,9 +148,12 @@ namespace Fungus
/// Trigger next line input event from script.
/// </summary>
public virtual void SetNextLineFlag()
{
if(writer.IsWaitingForInput || writer.IsWriting)
{
nextLineInputFlag = true;
}
}
/// <summary>
/// Set the ClickAnywhere click flag.
/// </summary>

5
Assets/Fungus/Scripts/Components/Writer.cs

@ -1009,10 +1009,11 @@ namespace Fungus
public virtual void OnNextLineEvent()
{
inputFlag = true;
if (isWriting)
if (isWriting || isWaitingForInput)
{
inputFlag = true;
NotifyInput();
}
}

Loading…
Cancel
Save