hud.show_quiz_panel method

show_quiz_panel(self, question: str, answer1: str, answer2: str, correct_answer: int, answer3: str = ..., answer4: str = ..., answer5: str = ..., answer6: str = ..., on_correct: Callable[[], None] = ..., on_wrong: Callable[[], None] = ...) -> Disposable:

Displays a panel with one question and up to four answers, one of which is correct. At least two answers and the correct answer must be defined.

Example

Parameters

  • question: str
  • answer1: str
  • answer2: str
  • correct_answer: int
  • answer3: (optional) str
  • answer4: (optional) str
  • answer5: (optional) str
  • answer6: (optional) str
  • on_correct: (optional) Callable[[], None]
  • on_wrong: (optional) Callable[[], None]

Returns