1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Kivy Version

- adjusted animation time settings
- some clean ups
This commit is contained in:
lufebe16 2023-11-15 11:33:02 +01:00
parent 953c3fc9cb
commit 9a4df67df3
6 changed files with 17 additions and 16 deletions

View file

@ -17,6 +17,7 @@ cardset-matching
cardset-matching-xl
cardset-matrix
cardset-mid-winter-eve-8x8
cardset-mini-ishido
cardset-mughal-ganjifa
cardset-mughal-ganjifa-xl
cardset-neo

View file

@ -46,7 +46,7 @@ else
pushd repo
git init
git remote add -t master origin https://github.com/shlomif/PySolFC-Cardsets.git
git fetch --depth 1 origin ae08657f931328439c5697165503a6360a75a7a6
git fetch --depth 1 origin 47f089ea71c9e9e7e386e932699496f7e7bcf6a8
git checkout -q FETCH_HEAD
popd

View file

@ -1458,9 +1458,9 @@ class Game(object):
card.tkraise()
c0 = cards[0]
dx, dy = (x - c0.x), (y - c0.y)
base = float(self.app.opt.animations)
duration = base*base/5.0/10.0
for card in cards:
base = float(self.app.opt.animations)
duration = base*0.1
card.animatedMove(dx, dy, duration)
for card in cards:
while card.animationIsRunning():

View file

@ -182,7 +182,7 @@ class LAnimationMgr(object):
# offset = duration*1.2
timedelay = offset * len(self.animations)
# print('offset = %s'% offset)
print('LAnimationMgr: timedelay = %s' % timedelay)
# print('LAnimationMgr: timedelay = %s' % timedelay)
if widget in self.widgets:
# append additional animation to widget

View file

@ -1879,7 +1879,7 @@ class PysolMenubarTk:
def updateBookmarkMenuState(self):
# LB:
print('updateBookmarkMenuState - fake')
# print('updateBookmarkMenuState - fake')
return
state = self._getEnabledState

View file

@ -292,7 +292,7 @@ class MfxCanvasImage(object):
self.addtag(group)
def __del__(self):
print('MfxCanvasImage: __del__(%s)' % self.image)
# print('MfxCanvasImage: __del__(%s)' % self.image)
self.canvas.clear_widgets([self.image])
def __str__(self):
@ -302,7 +302,7 @@ class MfxCanvasImage(object):
pass
def tkraise(self, aboveThis=None):
print(self, ': tkraise, above =', aboveThis)
# print(self, ': tkraise, above =', aboveThis)
abitm = None
if aboveThis:
@ -313,13 +313,13 @@ class MfxCanvasImage(object):
self.canvas.tag_raise(self.image, abitm)
def addtag(self, tag):
print('MfxCanvasImage: addtag %s' % tag.stack)
# print('MfxCanvasImage: addtag %s' % tag.stack)
self.group = tag
if (self.image):
self.image.group = tag
def dtag(self, tag):
print('MfxCanvasImage: remtag %s' % tag.stack)
# print('MfxCanvasImage: remtag %s' % tag.stack)
self.group = None
if (self.image):
self.image.group = None
@ -330,7 +330,7 @@ class MfxCanvasImage(object):
self.canvas.clear_widgets([self.image])
def move(self, dx, dy):
print('MfxCanvasImage: move %s, %s' % (dx, dy))
# print('MfxCanvasImage: move %s, %s' % (dx, dy))
image = self.image
dsize = image.coreSize
dpos = (image.corePos[0] + dx, image.corePos[1] + dy)
@ -340,14 +340,14 @@ class MfxCanvasImage(object):
def makeAnimStart(self):
def animStart(anim, widget):
print('MfxCanvasImage: animStart %s' % self)
# print('MfxCanvasImage: animStart %s' % self)
# nothing to do hiere
pass
return animStart
def makeAnimEnd(self, dpos, dsize):
def animEnd(anim, widget):
print('MfxCanvasImage: animEnd %s' % self)
# print('MfxCanvasImage: animEnd %s' % self)
self.animation = False
image = self.image
image.pos, image.size = self.canvas.CoreToKivy(dpos, dsize)
@ -393,7 +393,7 @@ class MfxCanvasImage(object):
class MfxCanvasLine(object):
def __init__(self, canvas, *args, **kwargs):
print('MfxCanvasLine: %s %s' % (args, kwargs))
# print('MfxCanvasLine: %s %s' % (args, kwargs))
self.canvas = canvas
line = LLine(canvas, args, **kwargs)
@ -404,11 +404,11 @@ class MfxCanvasLine(object):
self.widget = line
def delete_deferred(self, seconds):
print('MfxCanvasLine: delete_deferred(%s)' % seconds)
# print('MfxCanvasLine: delete_deferred(%s)' % seconds)
Clock.schedule_once(lambda dt: self.delete(), seconds)
def delete(self):
print('MfxCanvasLine: delete()')
# print('MfxCanvasLine: delete()')
self.canvas.clear_widgets([self.line])
@ -524,7 +524,7 @@ class MfxCanvas(Widget):
# self.tags = {} # bei basisklasse widget (ev. nur vorläufig)
self.wmain = wmain
print('MfxCanvas: wmain = %s' % self.wmain)
# print('MfxCanvas: wmain = %s' % self.wmain)
# Tkinter.Canvas.__init__(self, *args, **kw)
self.preview = 0