Exemplo n.º 1
0
 def add_text(self, name="", text="", pos=(0, 0, 0), scale=1, align=TextNode.ALeft):
     """
     docstring for add_text
     """
     if name == "":
         name = generate_hash(self)
     self[name] = OnscreenText(text=text, align=align, pos=pos, scale=scale)
     return self[name]
Exemplo n.º 2
0
 def add_text(self, name = '', text = '', pos = (0,0,0), scale = 1, align = TextNode.ALeft):
     """
     docstring for add_text
     """
     if name == '':
         name = generate_hash(self)
     self[name] = OnscreenText(text = text, align = align, pos = pos, scale = scale)
     return self[name]
Exemplo n.º 3
0
 def add_button(
     self, name="", text=("Button", "Button", "Button", "disabled"), pos=(0, 0, 0), scale=1, command=None
 ):
     """
     TODO: add docstring
     """
     if name == "":
         name = generate_hash(self)
     self[name] = DirectButton(text=text, pos=pos, scale=scale, command=command)
     return self[name]
Exemplo n.º 4
0
 def add_button(self, name = '', text = ("Button", "Button", "Button", "disabled"),
                             pos = (0,0,0), scale = 1, command = None):
     """
     TODO: add docstring
     """
     if name == '':
         name = generate_hash(self)
     self[name] = DirectButton(text = text, pos = pos, scale = scale,
                                                 command=command)
     return self[name]
Exemplo n.º 5
0
    def add_entry(self, name='', text = "" , pos = (0, 0, 0), scale=1, command = None,
            initialText="", width = 15, numLines = 1, focus=1):
        """
        docstring for add_entry
        """
        if name == '':
            name = generate_hash(self)
        self[name] = DirectEntry(text = text, pos = pos, scale = scale,
                                command = command, initialText = initialText,
                                width = width, numLines = numLines, focus = focus)

        return self[name]
Exemplo n.º 6
0
    def add_entry(
        self, name="", text="", pos=(0, 0, 0), scale=1, command=None, initialText="", width=15, numLines=1, focus=1
    ):
        """
        docstring for add_entry
        """
        if name == "":
            name = generate_hash(self)
        self[name] = DirectEntry(
            text=text,
            pos=pos,
            scale=scale,
            command=command,
            initialText=initialText,
            width=width,
            numLines=numLines,
            focus=focus,
        )

        return self[name]