Skip to content

Commit 1cce6e1

Browse files
committed
The mouse and the pieces are now alligned; No pieces have specified movements yet.
1 parent 1161334 commit 1cce6e1

File tree

2 files changed

+403
-198
lines changed

2 files changed

+403
-198
lines changed

Board.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
from kivy.uix.screenmanager import Screen
2-
from kivy.core.window import Window
31
from kivy.app import App
4-
from kivy.uix.widget import Widget
5-
from kivy.uix.scatter import Scatter
6-
from position_of_mouse import find_position
72
from kivy.uix.floatlayout import FloatLayout
3+
from kivy.core.window import Window
4+
5+
from position_of_mouse import find_position
86

97
class Scatter_Text_widget(FloatLayout):
10-
pass
8+
def on_mouse_pos(self, pos):
9+
#This function gets the position of the mouse, in chessboard labels
10+
position = find_position()
11+
pos_chess = position.chess_position(pos)
12+
print(pos_chess)
13+
14+
15+
Window.bind(mouse_pos = on_mouse_pos)
1116

1217

1318

0 commit comments

Comments
 (0)