columnWidth = int(round(float(dispWidth) / self.keyboardLength))
rects = []
- for i in range(self.keyboardLength) :
+ for i in range(self.keyboardLength - 1) :
upperLeftCorner = (i*columnWidth, 0)
rect = pygame.Rect(upperLeftCorner, (columnWidth, dispHeight))
rects.append(rect)
+ # la dernière colonne à la largeur du reste
+ upperLeftCorner = ((i+1) * columnWidth, 0)
+ rect = pygame.Rect(upperLeftCorner, (dispWidth - (self.keyboardLength - 1) * columnWidth , dispHeight))
+ rects.append(rect)
+
self.keyboardRects = rects
def _initColumns(self) :