Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
but = False
SimpleUI.state['clicked'] = True
for button in self.buttons:
if (button.containsPoint(x, y)):
button.do()
SimpleUI.state['clicked'] = False
but = True
break
for platform in self.gameRects:
if platform.rect.collidepoint(x, y):
self.selected = platform.rect
if SimpleUI.state['mode'] is not 'prop': SimpleUI.state['mode'] = 'drag'
else:
platform.setBy = eg.enterbox('ButtonGroup to that sets this platform')
print("set by"+platform.setBy+"yo")
if eg.boolbox("Platform visible by default?", "One more thing", ["Yes", "No"]):
platform.visibleDefault = True
else:
platform.visibleDefault = False
but = True
break
for gbutton in self.gameButtons:
if gbutton.rect.collidepoint(x,y):
self.selected = gbutton.rect
if SimpleUI.state['mode'] is not 'prop': SimpleUI.state['mode'] = 'drag'
else:
gbutton.sets = eg.enterbox('Object Group to set')
but = True
for recorder in self.gameRecorders:
if recorder.rect.collidepoint(x,y):
self.selected = recorder.rect
SimpleUI.state['mode'] = 'drag'
default="45.0"
)
)
speed = float(e.enterbox("please enter speed (e.g. 10.0)", default="10.0"))
t.setheading(180 - heading)
dx = math.cos(t.heading() * math.pi / 180) * speed
dy = math.sin(t.heading() * math.pi / 180) * speed
y = ground
while y >= ground:
x = t.xcor()
y = t.ycor()
dy -= 0.1
x += dx
y += dy
t.goto(x, y)
play = e.boolbox("play again?")
t.exitonclick()
def yn_choice(message, default='y', usegui=False):
if usegui:
return easygui.boolbox(message, __app__)
else:
choices = 'Y/n' if default.lower() in ('y', 'yes') else 'y/N'
choice = input("%s (%s) " % (message, choices))
values = ('y', 'yes', '') if default == 'y' else ('y', 'yes')
return choice.strip().lower() in values