Skip to content

Quality life update

Latest
Compare
Choose a tag to compare
@Tim-ats-d Tim-ats-d released this 09 Aug 18:00
09b01de

Quality life update

Major changes

  • DialogBox constructor now accept an argument global_win. It allows defining a curses window where to write by default. As a result, the win parameter of char_by_char and word_by_word methods has become optional and is now accepted as a second argument.
    This feature is useful when dealing with many DialogBox methods calls.

API changes

  • PanicError now inherits of KeyboardInterrupt exception.

  • An error ValueNotInBound (which inherits of ValueError) is now raised if inconsistent values are passed to DialogBox during instantiation (see related documentation).

  • Current window is now passed to second argument of callbacks during char_by_char and word_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.
  • char_by_char and word_by_word now returns text 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 from DialogBox was set on 60 (insteed 600)
  • Since their introduction, DialogBox.positions and DialogBox.dimension returns erroneous values. This is fixed.