def __init__(self, position, text, color=DEFAULT, size=DEFAULT, justification=DEFAULT, **data):
#Defaults are "item", and 0 (left).
color, size, justification = GUI.Component.default(color, state.getColorPalette().getColor("item"), size, 14,
justification, 0)
self.justification = justification
self.color = color
self.size = size
self.text = text if type(text) == str or type(text) == unicode else str(text)
self.textSurface = None
self.font = data.get("font", state.getFont())
self.use_freetype = data.get("freetype", False)
super(GUI.MultiLineText, self).__init__(position, **data)
self.refresh()
if self.width > state.getGUI().width:
self.width = state.getGUI().width
评论列表
文章目录