Ejemplo n.º 1
0
def descriptionText():
    # Get the first list of commands
    commands = getCommandsList()[0]

    # Get description text
    text = ""
    if len(commands) != 0:  # Only if there are commands to describe
        text = commandControl.description(commands[0])
        text = textControl.wrap(text, WRAP_AT)

        # Set the text of the object
    obj = objectControl.getFromScene(DESCRIPTION_OBJECT_NAME, SCENE_NAME)
    obj["Text"] = text
Ejemplo n.º 2
0
def statText(unit):
	# Setup each text object
	# Each list of stats displayed by a different text object
	quantityTextObjects = len(STATS)
	for i in range(0, quantityTextObjects):

		# Get text that object will display
		text = statsInLines(unit, STATS[i])
		# Description must be wrapped - Special case
		if STATS[i] == ['descript']:
			text = textControl.wrap(text, WRAP_AT)
		
		# Get text object
		objectName = TEXT_OBJECT_NAME_BASE + str(i)
		obj = objectControl.getFromScene(objectName, 'info')
		
		# Set that object's text
		obj['Text'] = text