Added basic ship stats as context menu for stage2, removed ship description as tooltip also.

This commit is contained in:
HomeWorld
2011-05-22 13:09:28 +03:00
parent 84d0f87eb0
commit f5b6bcadc0
3 changed files with 6 additions and 31 deletions

View File

@@ -1,14 +0,0 @@
def wrap(text, width):
"""
A word-wrap function that preserves existing line breaks
and most spaces in the text. Expects that existing line
breaks are posix newlines (\n).
"""
return reduce(lambda line, word, width=width: '%s%s%s' %
(line,
' \n'[(len(line)-line.rfind('\n')-1
+ len(word.split('\n',1)[0]
) >= width)],
word),
text.split(' ')
)