Esempio n. 1
0
            initialvalue = str(args[i + 1])
            i += 2
            currentList.append(DialogBox.TextInput(id, initialvalue))
        elif type == 'endrow':
            currentList = elementsToCreate
        elif type == 'row':
            currentList = []
            elementsToCreate.append(DialogBox.Row(currentList))
        else:
            debug.debug("Unknown dialog item type " + str(type))
    return elementsToCreate


if not VS.isserver():
    font_size = 1.0
    text_height = Base.GetTextHeight('|', tuple([font_size] * 3)) * 1.05
    list_height = 0.0
    screen_color = GUI.GUIColor(
        200 / 255.0, 220 / 255.0, 210 / 255.0
    )  # first I tried rgb(56 60 24) and rgb(40 44 20); both were too light
    input_color = GUI.GUIColor(25 / 255.0, 25 / 255.0, 75 / 255.0)
    screen_bgcolor = GUI.GUIColor(0.9, 0.9, 1.0, 0.7)
    screen_bgcolor_nc = GUI.GUIColor(0.1, 0.0, 0.4)


def makeRect(x, y, wid, hei):
    return GUI.GUIRect(x, y, wid, hei, 'normalized_biased_scaled')


class DialogBox:
    class Item: