Skip to content

Commit 68edb1a

Browse files
committed
Correction in doc according callbacks API changes.
1 parent 3a95fb9 commit 68edb1a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

doc/source/faq.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ See the `dedicated example <https://github.com/Tim-ats-d/Visual-dialog/tree/main
1111
How can I continue to manage screen display while a DialogBox is writing text on the screen?
1212
--------------------------------------------------------------------------------------------
1313

14-
``char_by_char`` and ``word_by_word`` methods of ``DialogBox`` class accept a callback in parameter.
15-
You can also pass arguments to this callback via ``cargs`` parameter.
16-
17-
The past callback is executed after downtime delay between character or word display.
18-
You can use this behavior to perform multiple tasks while ``DialogBox`` scrolling.
14+
``char_by_char`` and ``word_by_word`` methods of ``DialogBox`` class accept a ``callbacks`` in parameter.
15+
It must be a function iterable.
16+
You can use this behavior to perform multiple tasks while text scrolling.
1917

2018
I am not satisfied with the behavior of DialogBox, how can I change it?
2119
-----------------------------------------------------------------------

visualdialog/dialog.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ def char_by_char(self,
254254
:param callback: Iterable of callable called one by one after
255255
writing a character and the delay time has elapsed. This
256256
defaults to an empty tuple.
257+
The arguments passed to the given callables are:
258+
- the current instance (``self``).
259+
- the character previously written.
260+
- the index of the character previously written in the
261+
word being written.
257262
258263
.. NOTE::
259264
Method flow:
@@ -352,6 +357,9 @@ def word_by_word(self,
352357
:param callback: Iterable of callable called one by one after
353358
writing a word and the delay time has elapsed. This defaults
354359
to an empty tuple.
360+
The arguments passed to the given callables are:
361+
- the current instance (``self``).
362+
- the word previously written.
355363
356364
.. NOTE::
357365
Method flow:

0 commit comments

Comments
 (0)