Dateien nach "devkit/modules" hochladen
parent
f9b5051b6c
commit
d1c647c8cf
|
@ -0,0 +1,5 @@
|
|||
from modules import exists
|
||||
from modules import WF
|
||||
from modules import initcom
|
||||
from modules import rungame
|
||||
from modules import getgames
|
|
@ -0,0 +1,8 @@
|
|||
def check():
|
||||
return """
|
||||
import os
|
||||
try:
|
||||
os.stat("games/{}")
|
||||
print("1")
|
||||
except OSError:
|
||||
print("0")"""
|
|
@ -0,0 +1,9 @@
|
|||
def check():
|
||||
return """
|
||||
gameman.initgames()
|
||||
temp = gameman.games
|
||||
temp2 = temp.copy()
|
||||
for i in temp2:
|
||||
temp2[i] = "PH"
|
||||
print(temp2)
|
||||
"""
|
|
@ -0,0 +1,59 @@
|
|||
def check():
|
||||
return """
|
||||
initlcd()
|
||||
initGD()
|
||||
joystick = modules.joystickc()
|
||||
actionbuttons = modules.actionbuttonsc()
|
||||
gameman = modules.gamemanager()
|
||||
def selectoption(title, options, cover=False, covers=[]):
|
||||
if cover == True and len(covers) != len(options):
|
||||
raise ValueError("not enough covers!")
|
||||
if cover == True:
|
||||
file = open("SC.txt", 'r')
|
||||
SC = file.read()
|
||||
SC = eval(SC)
|
||||
file.close()
|
||||
selectedoption = 0
|
||||
previousselect = 0
|
||||
while True:
|
||||
lcd.move_to(0, 0)
|
||||
lcd.clear()
|
||||
lcd.putstr(title)
|
||||
lcd.move_to(0, 1)
|
||||
lcd.putstr(options[selectedoption])
|
||||
time.sleep(0.5)
|
||||
while True:
|
||||
temp = joystick.gethorizontal()
|
||||
selected = joystick.getsel()
|
||||
if selected:
|
||||
break
|
||||
if cover == True:
|
||||
display.fill(0)
|
||||
display.cover(covers[selectedoption])
|
||||
if previousselect != selectedoption:
|
||||
display.cover(SC)
|
||||
display.show()
|
||||
time.sleep(0.3)
|
||||
previousselect = selectedoption
|
||||
if temp == -1:
|
||||
if selectedoption != 0:
|
||||
selectedoption -= 1
|
||||
else:
|
||||
selectedoption = len(options)-1
|
||||
break
|
||||
elif temp == 1:
|
||||
if selectedoption != len(options)-1:
|
||||
selectedoption += 1
|
||||
else:
|
||||
selectedoption = 0
|
||||
break
|
||||
if selected:
|
||||
break
|
||||
lcd.move_to(0, 0)
|
||||
lcd.clear()
|
||||
if cover == True:
|
||||
display.fill(0)
|
||||
display.show()
|
||||
return selectedoption
|
||||
print("INITCOM BLM done!")
|
||||
"""
|
|
@ -0,0 +1,5 @@
|
|||
def check():
|
||||
return """
|
||||
gameman.initgames()
|
||||
gameman.start("{}", globals())
|
||||
"""
|
Loading…
Reference in New Issue