snozbot / fungus

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

DialogInput EventSystem mouse click buffers issue #950

Closed breadnone closed 3 years ago

breadnone commented 3 years ago

Describe the bug The problem with Fungus' DialogInput is that even though there's a delay timer for each click it doesn't handle the input buffer which being queued by EventSystem. This makes multiple clicks at the end of Say will auto complete the rest of texts.

This bug related to these issues: https://github.com/snozbot/fungus/issues/910 https://github.com/snozbot/fungus/issues/936

To Reproduce Spam clicks at the end of Say, the next Say will auto complete the rest of the texts

Expected behavior Should not auto complete the texts

Additional context The answer in below link looks like a good explanation https://answers.unity.com/questions/1492578/how-can-i-introduce-a-time-delay-in-inputs-to-unit.html

breadnone commented 3 years ago

Turns out there was no check for when setting the nextflag to true... Any button presses when will set next flag to true regardles it's writing or not.. Will open pr for this in a sec

Though it will still autocomplete texts when there's menu choices!