How to use the easygui.boolbox function in easygui

To help you get started, we’ve selected a few easygui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mcdenhoed / redo / leveleditor.py View on Github external
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'
github horstjens / ThePythonGameBook / python / turtle / cannon.py View on Github external
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()
github FredHutch / proxmox-tools / prox / cmdprox.py View on Github external
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

easygui

EasyGUI is a module for very simple, very easy GUI programming in Python. EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls.

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

61 / 100
Full package analysis