add sample image

This commit is contained in:
Daniel afx 2020-09-22 00:13:51 +03:00
parent bce36ff0e1
commit a1c838d300
2 changed files with 14 additions and 4 deletions

BIN
images/player.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

18
main.py
View file

@ -1,12 +1,22 @@
from kivy.app import App
from kivy.clock import Clock
from kivy.uix.label import Label
from kivy.uix.widget import Widget
from kivy.graphics import Rectangle
class GameWidget(Widget):
def __init__(self,**kwargs):
super().__init__(**kwargs)
with self.canvas:
Rectangle(source="images/player.png", pos=(0,0), size=(100,100))
class GlobalForest(App):
def build(self):
return Label(text='Hello world')
#return Label(text='Hello world')
return GameWidget()
if __name__ == '__main__':
GlobalForest().run()
app = GlobalForest()
app.run()