Quality life update
Major changes
DialogBox
constructor now accept an argumentglobal_win
. It allows defining acurses
window where to write by default. As a result, thewin
parameter ofchar_by_char
andword_by_word
methods has become optional and is now accepted as a second argument.
This feature is useful when dealing with manyDialogBox
methods calls.
API changes
-
PanicError
now inherits ofKeyboardInterrupt
exception. -
An error
ValueNotInBound
(which inherits ofValueError
) is now raised if inconsistent values are passed toDialogBox
during instantiation (see related documentation). -
Current window is now passed to second argument of callbacks during
char_by_char
andword_by_word
execution. -
Arguments are now passed to callbacks:
- For
char_by_char
method:- the instance of the class used (self), current curses window, character written and index of the character in the current word being written.
- For
word_by_word
method:- the instance of the class used (self), current curses window and word written.
- For
-
char_by_char
andword_by_word
now returnstext
argument that are passed to them at the end of their scrolling. -
Improve documentation.
Bug fix
- Fix a bug introduced in previous version: default value of
downtime_chars_delay
parameter fromDialogBox
was set on60
(insteed600
) - Since their introduction,
DialogBox.positions
andDialogBox.dimension
returns erroneous values. This is fixed.