nimbusinator.nimbus.Nimbus¶
-
class
nimbusinator.nimbus.
Nimbus
(full_screen=False, title='Nimbusinator', border_size=40, silent=False)¶ Nimbus video display class.
This class represents the Nimbus video display that will host the user interface for your application. When created, the new Nimbus object will not be visible until the boot() method has been called.
Parameters: - full_screen (bool, optional) – Full screen mode
- title (str, optional) – The title of the display window
- border_size (int, optional) – The thickness of the border in pixels (default is 40)
- silent (bool, optional) – Run Nimbusinator in silent mode (default is False)
-
boot
(skip_welcome_screen=False)¶ Boot the Nimbus
This will reveal the display screen and start all the Nimbus-related processed. By default the Nimbus will go through the Welcome Screen and a mock boot-up sequence before returning control to your app. You can bypass the Welcome Screen by passing skip_welcome_screen=True. Once boot() has been called, the Nimbus can be interrupted and stopped programmatically by calling the shutdown() method, or during runtime by the user pressing CTRL-C.
Parameters: skip_welcome_screen (bool, optional) – Bypass the Welcome Screen and boot sequence
-
empty_paper
()¶ Return empty paper filled with the current paper colour
-
plonk_image_on_paper
(img, coord, transparent=False)¶ Plonk a PIL image somewhere on the paper
The passed coordinates are consistent with RM Nimbus implemented, i.e. bottom-left of screen = (0, 0) and any images are located relative to their bottom-left corner
Parameters: - img (PIL image) – The image to be plonked
- coord (tuple) – The coordinate tuple (x, y)
- transparent (bool, optional) – True if image contains an alpha layer for transparency
-
run_floppy
(flag)¶ Run or stop the floppy drive sound effects
Augment your user experience with the industrial melodies of a 1980s PC floppy drive
Parameters: flag (boolean) – True to run the drive, False to stop
-
shutdown
()¶ Shut down the Nimbus
Stops all commands from executing, stops all Nimbus-related processes, closes the display window and halts program execution.
-
sleep
(sleep_time)¶ Pause execution like time.sleep()
Unlike time.sleep(), this built-in sleep method will be interrupted if the user hits CTRL-C. Sleep time measured in seconds.