Merge pull request #1930 from ViToni/feature/Add_blank_screen_for_MacroPad

Thank you
This commit is contained in:
Anne Barela 2024-04-20 08:52:10 -04:00 committed by GitHub
commit 33456edce4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 1 deletions

View file

@ -39,6 +39,10 @@ class App:
""" Activate application settings; update OLED labels and LED """ Activate application settings; update OLED labels and LED
colors. """ colors. """
group[13].text = self.name # Application name group[13].text = self.name # Application name
if self.name:
rect.fill = 0xFFFFFF
else: # empty app name indicates blank screen for which we dimm header
rect.fill = 0x000000
for i in range(12): for i in range(12):
if i < len(self.macros): # Key in use, set label + LED color if i < len(self.macros): # Key in use, set label + LED color
macropad.pixels[i] = self.macros[i][0] macropad.pixels[i] = self.macros[i][0]
@ -70,7 +74,8 @@ for key_index in range(12):
macropad.display.height - 1 - macropad.display.height - 1 -
(3 - y) * 12), (3 - y) * 12),
anchor_point=(x / 2, 1.0))) anchor_point=(x / 2, 1.0)))
group.append(Rect(0, 0, macropad.display.width, 12, fill=0xFFFFFF)) rect = Rect(0, 0, macropad.display.width, 12, fill=0xFFFFFF)
group.append(rect)
group.append(label.Label(terminalio.FONT, text='', color=0x000000, group.append(label.Label(terminalio.FONT, text='', color=0x000000,
anchored_position=(macropad.display.width//2, -2), anchored_position=(macropad.display.width//2, -2),
anchor_point=(0.5, 0.0))) anchor_point=(0.5, 0.0)))

View file

@ -0,0 +1,28 @@
# MACROPAD Hotkeys: blank screen for idle
# Contributed by GitHub @vitoni
app = { # REQUIRED dict, must be named 'app'
'name' : '', # Application name
'macros' : [ # List of button macros...
# COLOR LABEL KEY SEQUENCE
# 1st row ----------
(0x000000, '', []),
(0x000000, '', []),
(0x000000, '', []),
# 2nd row ----------
(0x000000, '', []),
(0x000000, '', []),
(0x000000, '', []),
# 3rd row ----------
(0x000000, '', []),
(0x000000, '', []),
(0x000000, '', []),
# 4th row ----------
(0x000000, '', []),
(0x000000, '', []),
(0x000000, '', []),
# Encoder button ---
(0x000000, '', [])
]
}