Add some template code

This commit is contained in:
Kjell Wooding 2016-06-04 11:31:07 -07:00
parent d3a70c0fd1
commit a81703854c
3 changed files with 33 additions and 0 deletions

15
debug.kv Normal file
View File

@ -0,0 +1,15 @@
#:import random random
<Widget>:
canvas.after:
Color:
rgba: 1,1,1,.5
Line:
rectangle: self.x, self.y, self.width, self.height
width: 2
<DebugLabel@Button>:
size: self.parent.size
pos: self.parent.pos
background_color: random.random(), random.random(), random.random(), 0.6
text: 'debuglabel'

6
helloworld.kv Normal file
View File

@ -0,0 +1,6 @@
#:include debug.kv
<HelloWorld>:
DebugLabel:
text: 'hello world'

12
main.py Normal file
View File

@ -0,0 +1,12 @@
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
class HelloWorld(FloatLayout):
pass
class HelloWorldApp(App):
def build(self):
return HelloWorld()
if __name__ == '__main__':
HelloWorldApp().run()