2 changed files with 41 additions and 0 deletions
Binary file not shown.
@ -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…
Reference in new issue