Skip to content

Commit b36e0ab

Browse files
committed
created the chessboard background using kivy
1 parent 5cd7b22 commit b36e0ab

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

Board.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from kivy.app import App
2+
from kivy.uix.screenmanager import Screen
3+
from kivy.config import Config
4+
from kivy.core.window import Window
5+
6+
7+
class main_window(Screen):
8+
pass
9+
10+
class filename(App):
11+
def build(self):
12+
return main_window()
13+
14+
15+
16+
if __name__ == "__main__":
17+
width_of_board = 800
18+
height_of_board = 800
19+
#Set the Hight and Width of the App
20+
Config.set('graphics', 'width', str(width_of_board))
21+
Config.set('graphics', 'height', str(height_of_board))
22+
23+
#Make the App non-resizable
24+
Config.set('graphics', 'resizable', '0')
25+
Config.write()
26+
#Make the top windows bar go away
27+
#Window.borderless = True
28+
filename().run()

chessboard.png

352 KB
Loading

filename.kv

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# File name: Board.py
2+
3+
<main_window>
4+
canvas.before:
5+
Rectangle:
6+
pos: self.pos
7+
size: self.size
8+
source: 'chessboard.png'

0 commit comments

Comments
 (0)