Skip to content

Commit c8d2a7a

Browse files
Remove max_size usage with displayio.Group
1 parent 05cde58 commit c8d2a7a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Pico_MIDI_Fighter/code.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
WIDTH = 128
3030
HEIGHT = 128
3131
# display setup
32-
display = adafruit_ssd1327.SSD1327(display_bus, width=WIDTH, height=HEIGHT, brightness = 0.01)
32+
display = adafruit_ssd1327.SSD1327(display_bus, width=WIDTH, height=HEIGHT, brightness=0.01)
3333

3434
# main display group, shows default GUI menu
35-
splash = displayio.Group(max_size=60)
35+
splash = displayio.Group()
3636
# group for circle icons
37-
circle_group = displayio.Group(max_size=30)
37+
circle_group = displayio.Group()
3838
# group for text labels on circles
39-
text_group = displayio.Group(max_size=30)
39+
text_group = displayio.Group()
4040

4141
# list of circle positions
4242
spots = (
@@ -64,7 +64,7 @@
6464
# adding circles to their display group
6565
circle_group.append(circle)
6666
# square to show position on menu
67-
rect = Rect(0, 0, 33, 33, fill=None, outline=0x00FF00, stroke = 3)
67+
rect = Rect(0, 0, 33, 33, fill=None, outline=0x00FF00, stroke=3)
6868

6969
splash.append(circle_group)
7070
splash.append(rect)
@@ -99,7 +99,7 @@
9999
splash.append(text_group)
100100

101101
# secondary display group, shows large circle when button is selected
102-
big_splash = displayio.Group(max_size=60)
102+
big_splash = displayio.Group()
103103
# large circle to fill display
104104
big_circle = Circle(x0=64, y0=64, r=62, fill=0x888888)
105105
big_splash.append(big_circle)
@@ -201,8 +201,10 @@
201201
down_scroll = 0
202202
left_scroll = 0
203203
right_scroll = 0
204-
switch_coordinates = [(0, 0), (1, 0), (2, 0), (3, 0), (0, 1), (1, 1), (2, 1), (3, 1), (0, 2),
205-
(1, 2), (2, 2), (3, 2), (0, 3), (1, 3), (2, 3), (3, 3)]
204+
switch_coordinates = [(0, 0), (1, 0), (2, 0), (3, 0),
205+
(0, 1), (1, 1), (2, 1), (3, 1),
206+
(0, 2), (1, 2), (2, 2), (3, 2),
207+
(0, 3), (1, 3), (2, 3), (3, 3)]
206208

207209
# array of default MIDI notes
208210
midi_notes = [60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75]

0 commit comments

Comments
 (0)