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

Updated text display alignment for a few games.

This commit is contained in:
Joe R 2021-08-21 20:05:39 -04:00
parent bd3e3cd083
commit db720f0079
4 changed files with 21 additions and 19 deletions

View file

@ -86,13 +86,14 @@ class AcesAndKings(Game):
stack = AcesAndKings_FoundationStack(x, y, self, suit=j,
base_rank=i[0], dir=1,
max_cards=(13 - i[0]))
stack.texts.misc = MfxCanvasText(self.canvas,
x + l.CW // 2,
y + l.CH // 2,
anchor="center",
font=font)
stack.texts.misc.config(text=(RANKS[i[0]][0]))
s.foundations.append(stack)
if self.preview <= 1:
stack.texts.misc = MfxCanvasText(self.canvas,
x + l.CW // 2,
y + l.CH // 2,
anchor="center",
font=font)
stack.texts.misc.config(text=(RANKS[i[0]][0]))
s.foundations.append(stack)
x = x + l.XS
x = x + (l.XS / 2)
@ -100,13 +101,14 @@ class AcesAndKings(Game):
stack = AcesAndKings_FoundationStack(x, y, self, suit=j,
base_rank=i[1], dir=-1,
max_cards=(i[1] + 1))
stack.texts.misc = MfxCanvasText(self.canvas,
x + l.CW // 2,
y + l.CH // 2,
anchor="center",
font=font)
stack.texts.misc.config(text=(RANKS[i[1]][0]))
s.foundations.append(stack)
if self.preview <= 1:
stack.texts.misc = MfxCanvasText(self.canvas,
x + l.CW // 2,
y + l.CH // 2,
anchor="center",
font=font)
stack.texts.misc.config(text=(RANKS[i[1]][0]))
s.foundations.append(stack)
x = x + l.XS
x, y = l.XM, y + l.YS

View file

@ -132,7 +132,7 @@ class Canfield(Game):
tx, ty, ta, tf = lay.getTextAttr(None, "se")
tx, ty = x + tx + lay.XM, y + ty
else:
tx, ty, ta, tf = lay.getTextAttr(None, "ss")
tx, ty, ta, tf = lay.getTextAttr(None, "s")
tx, ty = x + tx, y + ty
font = self.app.getFont("canvas_default")
self.texts.info = MfxCanvasText(self.canvas, tx, ty,

View file

@ -735,11 +735,11 @@ class Crescent(Game):
l, s = Layout(self), self.s
playcards = 10
w0 = l.XS+(playcards-1)*l.XOFFSET
w, h = l.XM+max(4*w0, 9*l.XS), l.YM+5*l.YS
w, h = l.XM+max(4*w0, 9*l.XS), l.YM + 5 * l.YS + l.TEXT_HEIGHT
self.setSize(w, h)
x, y = l.XM, l.YM
s.talon = Crescent_Talon(x, y, self, max_rounds=4)
l.createRoundText(s.talon, 'ne')
l.createRoundText(s.talon, 's')
x, y = w-8*l.XS, l.YM
for i in range(4):
s.foundations.append(SS_FoundationStack(x, y, self, suit=i))
@ -748,7 +748,7 @@ class Crescent(Game):
s.foundations.append(SS_FoundationStack(x, y, self, suit=i,
base_rank=KING, dir=-1))
x += l.XS
y = l.YM+l.YS
y = l.YM + l.YS + l.TEXT_HEIGHT
for i in range(4):
x = l.XM
for j in range(4):

View file

@ -138,7 +138,7 @@ class PushPin(Game):
pad = 1
if self.Comment:
pad = 5
pad = l.TEXT_HEIGHT
# set window
xx, yy = 9, 6