Quality life update
Major changes
DialogBoxconstructor now accept an argumentglobal_win. It allows defining acurseswindow where to write by default. As a result, thewinparameter ofchar_by_charandword_by_wordmethods has become optional and is now accepted as a second argument.
This feature is useful when dealing with manyDialogBoxmethods calls.
API changes
-
PanicErrornow inherits ofKeyboardInterruptexception. -
An error
ValueNotInBound(which inherits ofValueError) is now raised if inconsistent values are passed toDialogBoxduring instantiation (see related documentation). -
Current window is now passed to second argument of callbacks during
char_by_charandword_by_wordexecution. -
Arguments are now passed to callbacks:
- For
char_by_charmethod:- 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_wordmethod:- the instance of the class used (self), current curses window and word written.
- For
-
char_by_charandword_by_wordnow returnstextargument 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 fromDialogBoxwas set on60(insteed600) - Since their introduction,
DialogBox.positionsandDialogBox.dimensionreturns erroneous values. This is fixed.