suppress mod keys, pass rotate state to game
This commit is contained in:
parent
f43eb04e36
commit
482d94d925
|
@ -73,6 +73,9 @@ class Playzing(pgfw.Game):
|
||||||
self.register(self.reveal_text, interval=40)
|
self.register(self.reveal_text, interval=40)
|
||||||
self.play(self.animate_logo, play_once=True)
|
self.play(self.animate_logo, play_once=True)
|
||||||
|
|
||||||
|
# Don't let modifier keys trigger an any key event
|
||||||
|
self.input.suppress_any_key_on_mods()
|
||||||
|
|
||||||
def initialize_gpio(self):
|
def initialize_gpio(self):
|
||||||
"""
|
"""
|
||||||
Set pin numbering mode to GPIO, initialize all buttons to input pullup.
|
Set pin numbering mode to GPIO, initialize all buttons to input pullup.
|
||||||
|
@ -181,7 +184,7 @@ class Playzing(pgfw.Game):
|
||||||
if self.delegate.compare(event, "any"):
|
if self.delegate.compare(event, "any"):
|
||||||
os.chdir(pathlib.Path("games/ibitfit"))
|
os.chdir(pathlib.Path("games/ibitfit"))
|
||||||
print(f"current working dir is {os.getcwd()}")
|
print(f"current working dir is {os.getcwd()}")
|
||||||
ibitfit = ElectricSieve(suppress_gpio_init=True)
|
ibitfit = ElectricSieve(suppress_gpio_init=True, rotate=self.rotated)
|
||||||
ibitfit.display.set_screen(dimensions=ibitfit.configuration.get("display", "dimensions"))
|
ibitfit.display.set_screen(dimensions=ibitfit.configuration.get("display", "dimensions"))
|
||||||
ibitfit.run()
|
ibitfit.run()
|
||||||
os.chdir(pathlib.Path("../.."))
|
os.chdir(pathlib.Path("../.."))
|
||||||
|
|
Loading…
Reference in New Issue