fix: tipBoard and bigBoard

This commit is contained in:
rtw1x1
2026-02-19 19:28:07 +00:00
parent 88bc6bfe79
commit f48c30c81d
2 changed files with 3 additions and 3 deletions

View File

@@ -778,7 +778,7 @@ class EditLine(TextLine):
def OnIMEUpdate(self): def OnIMEUpdate(self):
snd.PlaySound("sound/ui/type.wav") snd.PlaySound("sound/ui/type.wav")
TextLine.SetText(self, ime.GetText()) self.SetText(ime.GetText())
def OnIMETab(self): def OnIMETab(self):
if self.eventTab: if self.eventTab:

View File

@@ -236,13 +236,13 @@ class BigBoard(ui.Bar):
if len(self.tipList) == 1: if len(self.tipList) == 1:
checkTime, text = self.tipList[0] checkTime, text = self.tipList[0]
(text_width, text_height) = self.textBar.GetTextExtent(text) (text_width, text_height) = self.textBar.GetTextExtent(text)
self.textBar.TextOut((500-text_width)/2, (self.STEP_HEIGHT-8-text_height)/2, text) self.textBar.TextOut((500-text_width)//2, (self.STEP_HEIGHT-8-text_height)//2, text)
else: else:
index = 0 index = 0
for checkTime, text in self.tipList: for checkTime, text in self.tipList:
(text_width, text_height) = self.textBar.GetTextExtent(text) (text_width, text_height) = self.textBar.GetTextExtent(text)
self.textBar.TextOut((500-text_width)/2, index*self.LINE_HEIGHT, text) self.textBar.TextOut((500-text_width)//2, index*self.LINE_HEIGHT, text)
index += 1 index += 1
def SetTip(self, text): def SetTip(self, text):