Skip to content

Fixed example to work with CP 4 and fixed index out of range error #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adafruit_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def label(self):

@label.setter
def label(self, newtext):
if self._label and (self.group[-1] == self._label):
if self._label and self.group and (self.group[-1] == self._label):
self.group.pop()

self._label = None
Expand Down
4 changes: 2 additions & 2 deletions examples/display_button_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
color_palette[0] = 0x404040
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
position=(0, 0))
print(bg_sprite.position)
x=0, y=0)
print(bg_sprite.x, bg_sprite.y)
splash.append(bg_sprite)

##########################################################################
Expand Down