Browse Source

add kivy app

main
starless 2 months ago
parent
commit
61701638bc
  1. BIN
      __pycache__/catarot.cpython-38.pyc
  2. 41
      kivytest.py

BIN
__pycache__/catarot.cpython-38.pyc

Binary file not shown.

41
kivytest.py

@ -0,0 +1,41 @@
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from catarot import build_card_index
from catarot import print_card
import time
Builder.load_string('''
<ClickyThing>:
orientation: 'horizontal'
Button:
text: 'Print card!'
size_hint_x: 1
size_hint_y: 1
on_press:
on_release: root.doLeft()
Button:
text: 'Exit!'
size_hint_x: 1
size_hint_y: 1
on_press:
on_release: root.doRight()
''')
class ClickyThing(BoxLayout):
def doLeft(self):
print("Printing card...")
c = build_card_index()
print_card(c)
def doRight(self):
print("exiting")
exit()
class TestApp(App):
def build(self):
return ClickyThing()
print("running")
TestApp().run()
Loading…
Cancel
Save