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):
90
90
self .backlight_fade (0 )
91
91
board .DISPLAY .show (self .root_group )
92
92
self .touchscreen = None
93
+ self .mouse_cursor = None
93
94
if hasattr (board , 'TOUCH_XL' ):
94
95
self .touchscreen = adafruit_touchscreen .Touchscreen (board .TOUCH_XL , board .TOUCH_XR ,
95
96
board .TOUCH_YD , board .TOUCH_YU ,
@@ -152,14 +153,16 @@ def load_game(self, game_directory):
152
153
153
154
def _fade_to_black (self ):
154
155
"""Turn down the lights."""
155
- self .mouse_cursor .is_hidden = True
156
+ if self .mouse_cursor :
157
+ self .mouse_cursor .is_hidden = True
156
158
self .backlight_fade (0 )
157
159
# turn off background so we can render the text
158
160
self .set_background (None , with_fade = False )
159
161
self .set_text (None , None )
160
162
for _ in range (len (self ._button_group )):
161
163
self ._button_group .pop ()
162
- self .mouse_cursor .is_hidden = False
164
+ if self .mouse_cursor :
165
+ self .mouse_cursor .is_hidden = False
163
166
164
167
def _display_buttons (self , card ):
165
168
"""Display the buttons of a card.
You can’t perform that action at this time.
0 commit comments