else
This commit is contained in:
parent
192f27ff30
commit
bd9f1e5779
2 changed files with 15 additions and 12 deletions
|
@ -3,3 +3,5 @@
|
||||||
\+ Added changelog. I probably will get lazy and stop updating this eventually
|
\+ Added changelog. I probably will get lazy and stop updating this eventually
|
||||||
|
|
||||||
\+ Added phantom, incomplete implementation
|
\+ Added phantom, incomplete implementation
|
||||||
|
|
||||||
|
\= Mouse control is a little bit nicer, click must be a minimum distance from H to initiate a move
|
|
@ -207,8 +207,8 @@ class tgame:
|
||||||
|
|
||||||
|
|
||||||
def translatemouse(event):
|
def translatemouse(event):
|
||||||
event.x -= 6
|
event.x -= 9
|
||||||
event.y -= 14
|
event.y -= 9
|
||||||
#485
|
#485
|
||||||
|
|
||||||
event.x /= 8
|
event.x /= 8
|
||||||
|
@ -216,6 +216,7 @@ class tgame:
|
||||||
#print(event.x, event.y)
|
#print(event.x, event.y)
|
||||||
xdif = event.x - self.xpos
|
xdif = event.x - self.xpos
|
||||||
ydif = event.y - self.ypos
|
ydif = event.y - self.ypos
|
||||||
|
if abs(xdif) >= 0.5 or abs(ydif) >= 0.5:
|
||||||
if abs(xdif) >= abs(ydif):
|
if abs(xdif) >= abs(ydif):
|
||||||
xdif /= abs(xdif)
|
xdif /= abs(xdif)
|
||||||
xdif = int(xdif)
|
xdif = int(xdif)
|
||||||
|
|
Loading…
Reference in a new issue