예제 #1
0
    def _add_editcontrol(self, x, y, height, width, password=False):

        kwargs = dict(label="User",
                      font="font13",
                      textColor="FF00A4DC",
                      disabledColor="FF888888",
                      focusTexture="-",
                      noFocusTexture="-")

        # TODO: Kodi 17 compat removal cleanup
        if kodi_version() < 18:
            kwargs['isPassword'] = password

        control = xbmcgui.ControlEdit(0, 0, 0, 0, **kwargs)

        control.setPosition(x, y)
        control.setHeight(height)
        control.setWidth(width)

        self.addControl(control)

        # setType has no effect before the control is added to a window
        # TODO: Kodi 17 compat removal cleanup
        if password and not kodi_version() < 18:
            control.setType(xbmcgui.INPUT_TYPE_PASSWORD,
                            "Please enter password")

        return control
예제 #2
0
    def _add_editcontrol(self, x, y, height, width, password=False):

        control = xbmcgui.ControlEdit(0,
                                      0,
                                      0,
                                      0,
                                      label="User",
                                      font="font13",
                                      textColor="FF00A4DC",
                                      disabledColor="FF888888",
                                      focusTexture="-",
                                      noFocusTexture="-")

        control.setPosition(x, y)
        control.setHeight(height)
        control.setWidth(width)

        self.addControl(control)

        # setType has no effect before the control is added to a window
        if password:
            control.setType(xbmcgui.INPUT_TYPE_PASSWORD,
                            "Please enter password")

        return control
예제 #3
0
    def _add_editcontrol(self, x, y, height, width):

        media = os.path.join(xbmcaddon.Addon(addon_id()).getAddonInfo('path'), 'resources', 'skins', 'default', 'media')
        control = xbmcgui.ControlEdit(0, 0, 0, 0,
                                      label="User",
                                      font="font13",
                                      textColor="FF00A4DC",
                                      disabledColor="FF888888",
                                      focusTexture="-",
                                      noFocusTexture="-")
        control.setPosition(x, y)
        control.setHeight(height)
        control.setWidth(width)

        self.addControl(control)
        return control
예제 #4
0
    def _add_editcontrol(self, x, y, height, width, password=False):

        control = xbmcgui.ControlEdit(0, 0, 0, 0,
                                      label="User",
                                      font="font13",
                                      textColor="FF00A4DC",
                                      disabledColor="FF888888",
                                      focusTexture="-",
                                      noFocusTexture="-",
                                      isPassword=password)
        control.setPosition(x, y)
        control.setHeight(height)
        control.setWidth(width)

        self.addControl(control)

        return control