Hide mouse pointer
This commit is contained in:
parent
ab079ff3a1
commit
60fb612678
|
|
@ -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
|
||||||
|
|
|
||||||
5
main.py
5
main.py
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue