File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ def __init__(self):
9090 self .backlight_fade (0 )
9191 board .DISPLAY .show (self .root_group )
9292 self .touchscreen = None
93+ self .mouse_cursor = None
9394 if hasattr (board , 'TOUCH_XL' ):
9495 self .touchscreen = adafruit_touchscreen .Touchscreen (board .TOUCH_XL , board .TOUCH_XR ,
9596 board .TOUCH_YD , board .TOUCH_YU ,
@@ -152,14 +153,16 @@ def load_game(self, game_directory):
152153
153154 def _fade_to_black (self ):
154155 """Turn down the lights."""
155- self .mouse_cursor .is_hidden = True
156+ if self .mouse_cursor :
157+ self .mouse_cursor .is_hidden = True
156158 self .backlight_fade (0 )
157159 # turn off background so we can render the text
158160 self .set_background (None , with_fade = False )
159161 self .set_text (None , None )
160162 for _ in range (len (self ._button_group )):
161163 self ._button_group .pop ()
162- self .mouse_cursor .is_hidden = False
164+ if self .mouse_cursor :
165+ self .mouse_cursor .is_hidden = False
163166
164167 def _display_buttons (self , card ):
165168 """Display the buttons of a card.
You can’t perform that action at this time.
0 commit comments