snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.6k stars 291 forks source link

nextLineInputFlagWon't Always Be True On Mouse Clicks #952

Closed breadnone closed 3 years ago

breadnone commented 3 years ago

Description

Currently the DialogInput will always set nextlineinputflag to true when clicking mouse multiple times even if there's no writing activity on screen, thus making the next Say auto-completed. Even mouse clicks when there's menu choices will trigger the next Say to be auto-completed.

This may solves: https://github.com/snozbot/fungus/issues/910 https://github.com/snozbot/fungus/issues/954

What is the current behavior?

Every mouse clicks will set nextlineinputflag to true

What is the new behavior?

Add condition to SetNextLineFlag so it won't always be true on button presses when there's no writing activity on screen or when the text is already completed.

Before:

https://user-images.githubusercontent.com/64100867/106449306-69653d00-64b6-11eb-8c3b-db07ff979a9c.mp4

After:

https://user-images.githubusercontent.com/64100867/106449364-7aae4980-64b6-11eb-912e-bfde64758b51.mp4

Other information

Previous, this auto-complete bug is all over my game. It also gets triggered when there's menu choices. So far, I've not encountered that glaring issue anymore with this patch.

Note: It works for my game, but still needs further testing!

Edit: I could not reproduce the issue with text automatically completed after clicking the button on menu choices. Probably fixed?

breadnone commented 3 years ago

Pardon the edits!

stevehalliwell commented 3 years ago

Thanks for the PR.