Ejemplo n.º 1
0
def main():
    import sys, os

    if len(sys.argv) == 2:
        filepath = os.path.join(os.getcwd(), sys.argv[1])
        app = Pie(filepath=filepath)
    else:
        app = Pie()
    app.run()
Ejemplo n.º 2
0
def demo(path, rootQueue):
    '''Event loop for demo application
    path: the .kv file to load
    rootQueue: a Queue that the root widget should be pushed onto (or None if creation fails)
    '''

    def _build():
        try:
            root = kivy.lang.Builder.load_file(path)
            rootQueue.put(root)
            return root
        except:
            rootQueue.put(None)
            raise

    app = kivy.app.App()
    app.build = _build
    app.run()
Ejemplo n.º 3
0

class Level23(kivy.uix.screenmanager.Screen):
    character_killed = False
    num_coins = 25
    num_coins_collected = 0
    coins_ids = {}
    char_anim_duration = 0.25
    num_monsters = 2
    num_fires = 2
    num_collisions_hit = 0
    num_collisions_level = 30


class Level24(kivy.uix.screenmanager.Screen):
    character_killed = False
    num_coins = 20
    num_coins_collected = 0
    coins_ids = {}
    char_anim_duration = 0.25
    num_monsters = 3
    num_fires = 2
    num_collisions_hit = 0
    num_collisions_level = 30


app = CointexApp()
app.title = "CoinTex"
app.icon = 'cointex_logo.png'
app.run()
Ejemplo n.º 4
0
 def custome_callback(self, btn):
     src = app.run(self.textInput.text)
     self.image.source = "custom.jpg"