Hide mouse pointer

This commit is contained in:
Nahuel Lofeudo 2022-12-18 19:04:44 +00:00
parent ab079ff3a1
commit 60fb612678
2 changed files with 4 additions and 3 deletions

View File

@ -78,7 +78,7 @@ Enable and start the service
``` ```
$ sudo systemctl daemon-reload $ sudo systemctl daemon-reload
$ sudo systemctl enable dublinbus-display $ sudo systemctl enable dublinbus-display
$ sudo systemctl start dublinbus-display $ sudo systemctl start dublinbus-display
``` ```
Restart the system Restart the system

View File

@ -97,10 +97,11 @@ def clear_screen() -> None:
pygame.draw.rect(surface=window, color=COLOR_BACKGROUND, width=0, rect=(0, 0, window.get_width(), window.get_height())) pygame.draw.rect(surface=window, color=COLOR_BACKGROUND, width=0, rect=(0, 0, window.get_width(), window.get_height()))
def init_screen(width: int, height: int) -> pygame.Surface: def init_screen() -> pygame.Surface:
""" Create a Surface to draw on, with the given size, using either X11/Wayland (desktop) or directfb (no desktop) """ """ Create a Surface to draw on, with the given size, using either X11/Wayland (desktop) or directfb (no desktop) """
pygame.display.init() pygame.display.init()
window = pygame.display.set_mode((0, 0)) window = pygame.display.set_mode((0, 0))
pygame.mouse.set_visible(False)
return window return window
@ -112,7 +113,7 @@ def main():
""" Main method. Initialise graphics context """ """ Main method. Initialise graphics context """
pygame.init() pygame.init()
window = init_screen(1920, 720) window = init_screen()
pygame.font.init() pygame.font.init()
font = pygame.font.Font(TEXT_FONT, TEXT_SIZE) font = pygame.font.Font(TEXT_FONT, TEXT_SIZE)