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 @@ -96,6 +96,7 @@ def __init__(self):
96
96
self .backlight_fade (0 )
97
97
board .DISPLAY .show (self .root_group )
98
98
self .touchscreen = None
99
+ self .mouse_cursor = None
99
100
if hasattr (board , 'TOUCH_XL' ):
100
101
self .touchscreen = adafruit_touchscreen .Touchscreen (board .TOUCH_XL , board .TOUCH_XR ,
101
102
board .TOUCH_YD , board .TOUCH_YU ,
@@ -158,14 +159,16 @@ def load_game(self, game_directory):
158
159
159
160
def _fade_to_black (self ):
160
161
"""Turn down the lights."""
161
- self .mouse_cursor .is_hidden = True
162
+ if self .mouse_cursor :
163
+ self .mouse_cursor .is_hidden = True
162
164
self .backlight_fade (0 )
163
165
# turn off background so we can render the text
164
166
self .set_background (None , with_fade = False )
165
167
self .set_text (None , None )
166
168
for _ in range (len (self ._button_group )):
167
169
self ._button_group .pop ()
168
- self .mouse_cursor .is_hidden = False
170
+ if self .mouse_cursor :
171
+ self .mouse_cursor .is_hidden = False
169
172
170
173
def _display_buttons (self , card ):
171
174
"""Display the buttons of a card.
You can’t perform that action at this time.
0 commit comments