mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix kneeboard bug preventing mission generation
This commit is contained in:
parent
b8ef4fc726
commit
c9ed0352b7
@ -116,7 +116,8 @@ class KneeboardPageWriter:
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.draw.text(self.position, text, font=font, fill=fill)
|
self.draw.text(self.position, text, font=font, fill=fill)
|
||||||
width, height = self.draw.textsize(text, font=font) # type:ignore[attr-defined]
|
box = self.draw.textbbox(self.position, text, font=font)
|
||||||
|
height = abs(box[1] - box[3]) # abs(top - bottom) => offset
|
||||||
self.y += height + self.line_spacing
|
self.y += height + self.line_spacing
|
||||||
self.text_buffer.append(text)
|
self.text_buffer.append(text)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user