Exemple #1
0
 def show(self, duration=None):
     """
     Request the current display show the dialog.
     @param duration: Time in seconds the dialog should be displayed for, if None uses self.duration.
     """
     if self.display is None:
         self.display = dialog.get_display()
     if duration is None:
         duration = self.duration
     self.display.show_dialog(self, duration)
Exemple #2
0
def get_osd():
    """
    Get the best supported OSD available.
    @return: An OSD object
    """
    display = dialog.get_display()

    if display.supports_dialogs:
        return GraphicsOSD()
    else:
        return TextOSD()