当前位置: 首页>>代码示例>>Python>>正文


Python xbmcgui.ControlEdit方法代码示例

本文整理汇总了Python中xbmcgui.ControlEdit方法的典型用法代码示例。如果您正苦于以下问题:Python xbmcgui.ControlEdit方法的具体用法?Python xbmcgui.ControlEdit怎么用?Python xbmcgui.ControlEdit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xbmcgui的用法示例。


在下文中一共展示了xbmcgui.ControlEdit方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _add_editcontrol

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlEdit [as 别名]
def _add_editcontrol(self, x, y, height, width, password=0):

        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="FF52b54b",
                                      disabledColor="FF888888",
                                      focusTexture="-",
                                      noFocusTexture="-",
                                      isPassword=password)
        control.setPosition(x, y)
        control.setHeight(height)
        control.setWidth(width)

        self.addControl(control)

        return control 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:20,代码来源:loginmanual.py

示例2: _add_editcontrol

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlEdit [as 别名]
def _add_editcontrol(self, x, y, height, width, password=0):

        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="FF52b54b",
                                      disabledColor="FF888888",
                                      focusTexture="-",
                                      noFocusTexture="-",
                                      isPassword=password)
        control.setPosition(x, y)
        control.setHeight(height)
        control.setWidth(width)

        self.addControl(control)
        return control 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:19,代码来源:loginconnect.py

示例3: _add_editcontrol

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlEdit [as 别名]
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="FF52b54b",
                                      disabledColor="FF888888",
                                      focusTexture="-",
                                      noFocusTexture="-")
        control.setPosition(x, y)
        control.setHeight(height)
        control.setWidth(width)

        self.addControl(control)
        return control 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:18,代码来源:servermanual.py

示例4: add_control_text

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlEdit [as 别名]
def add_control_text(self, c):
        if xbmcgui.ControlEdit == ControlEdit:
            control = xbmcgui.ControlEdit(0, -100, self.controls_width, self.height_control,
                                        c["label"], os.path.join(self.mediapath, 'Controls', 'MenuItemFO.png'),
                                        os.path.join(self.mediapath, 'Controls','MenuItemNF.png'),
                                        0, textColor=c["color"], 
                                        font=self.font, isPassword=c["hidden"], window=self)

        else:
            control = xbmcgui.ControlEdit(0, -100, self.controls_width - 5, self.height_control,
                                          c["label"], self.font, c["color"],  '', 4, isPassword=c["hidden"],
                                          focusTexture=os.path.join(self.mediapath, 'Controls', 'MenuItemFO.png'),
                                          noFocusTexture=os.path.join(self.mediapath, 'Controls', 'MenuItemNF.png'))


        self.addControl(control)

        control.setVisible(False)
        control.setLabel(c["label"])
        control.setText(self.values[c["id"]])
        control.setWidth(self.controls_width - 5)
        control.setHeight(self.height_control)

        c["control"] = control 
开发者ID:pelisalacarta-ce,项目名称:pelisalacarta-ce,代码行数:26,代码来源:xbmc_config_menu.py

示例5: add_control_text

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlEdit [as 别名]
def add_control_text(self, c):
        if xbmcgui.ControlEdit == ControlEdit:
            control = xbmcgui.ControlEdit(0, -100, self.controls_width, self.height_control,
                                          c["label"], os.path.join(self.mediapath, 'Controls', 'MenuItemFO.png'),
                                          os.path.join(self.mediapath, 'Controls', 'MenuItemNF.png'),
                                          0, textColor=c["color"],
                                          font=self.font, isPassword=c["hidden"], window=self)

        elif xbmcgui.__version__ in ["3.0", "3.0.0"]:
            control = xbmcgui.ControlEdit(0, -100, self.controls_width - 5, self.height_control,
                                          c["label"], self.font, c["color"], '', 4)
        else:
            control = xbmcgui.ControlEdit(0, -100, self.controls_width - 5, self.height_control,
                                          c["label"], self.font, c["color"], '', 4, isPassword=c["hidden"],
                                          focusTexture=os.path.join(self.mediapath, 'Controls', 'MenuItemFO.png'),
                                          noFocusTexture=os.path.join(self.mediapath, 'Controls', 'MenuItemNF.png'))

        self.addControl(control)

        control.setVisible(False)
        control.setLabel(c["label"])
        # frodo fix
        s = self.values[c["id"]]
        if s is None:
            s = ''
        control.setText(s)
        # control.setText(self.values[c["id"]])
        control.setWidth(self.controls_width - 5)
        control.setHeight(self.height_control)

        c["control"] = control 
开发者ID:alfa-addon,项目名称:addon,代码行数:33,代码来源:xbmc_config_menu.py

示例6: onAction

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlEdit [as 别名]
def onAction(self, action):
            self.close()

            # TODO mirar retro-compatiblidad
            # class ControlEdit(xbmcgui.ControlButton):
            #     def __new__(self, *args, **kwargs):
            #         del kwargs["isPassword"]
            #         del kwargs["window"]
            #         args = list(args)
            #         return xbmcgui.ControlButton.__new__(self, *args, **kwargs)
            #
            #     def __init__(self, *args, **kwargs):
            #         self.isPassword = kwargs["isPassword"]
            #         self.window = kwargs["window"]
            #         self.label = ""
            #         self.text = ""
            #         self.textControl = xbmcgui.ControlLabel(self.getX(), self.getY(), self.getWidth(), self.getHeight(),
            #                                                 self.text,
            #                                                 font=kwargs["font"], textColor=kwargs["textColor"], alignment=4 | 1)
            #         self.window.addControl(self.textControl)
            #
            #     def setLabel(self, val):
            #         self.label = val
            #         xbmcgui.ControlButton.setLabel(self, val)
            #
            #     def getX(self):
            #         return xbmcgui.ControlButton.getPosition(self)[0]
            #
            #     def getY(self):
            #         return xbmcgui.ControlButton.getPosition(self)[1]
            #
            #     def setEnabled(self, e):
            #         xbmcgui.ControlButton.setEnabled(self, e)
            #         self.textControl.setEnabled(e)
            #
            #     def setWidth(self, w):
            #         xbmcgui.ControlButton.setWidth(self, w)
            #         self.textControl.setWidth(w / 2)
            #
            #     def setHeight(self, w):
            #         xbmcgui.ControlButton.setHeight(self, w)
            #         self.textControl.setHeight(w)
            #
            #     def setPosition(self, x, y):
            #         xbmcgui.ControlButton.setPosition(self, x, y)
            #         self.textControl.setPosition(x + self.getWidth() / 2, y)
            #
            #     def setText(self, text):
            #         self.text = text
            #         if self.isPassword:
            #             self.textControl.setLabel("*" * len(self.text))
            #         else:
            #             self.textControl.setLabel(self.text)
            #
            #     def getText(self):
            #         return self.text
            #
            #
            # if not hasattr(xbmcgui, "ControlEdit"):
            #     xbmcgui.ControlEdit = ControlEdit 
开发者ID:alfa-addon,项目名称:addon,代码行数:62,代码来源:renumbertools.py

示例7: onAction

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlEdit [as 别名]
def onAction(self, action):
        self.close()

# TODO mirar retro-compatiblidad
# class ControlEdit(xbmcgui.ControlButton):
#     def __new__(self, *args, **kwargs):
#         del kwargs["isPassword"]
#         del kwargs["window"]
#         args = list(args)
#         return xbmcgui.ControlButton.__new__(self, *args, **kwargs)
#
#     def __init__(self, *args, **kwargs):
#         self.isPassword = kwargs["isPassword"]
#         self.window = kwargs["window"]
#         self.label = ""
#         self.text = ""
#         self.textControl = xbmcgui.ControlLabel(self.getX(), self.getY(), self.getWidth(), self.getHeight(),
#                                                 self.text,
#                                                 font=kwargs["font"], textColor=kwargs["textColor"], alignment=4 | 1)
#         self.window.addControl(self.textControl)
#
#     def setLabel(self, val):
#         self.label = val
#         xbmcgui.ControlButton.setLabel(self, val)
#
#     def getX(self):
#         return xbmcgui.ControlButton.getPosition(self)[0]
#
#     def getY(self):
#         return xbmcgui.ControlButton.getPosition(self)[1]
#
#     def setEnabled(self, e):
#         xbmcgui.ControlButton.setEnabled(self, e)
#         self.textControl.setEnabled(e)
#
#     def setWidth(self, w):
#         xbmcgui.ControlButton.setWidth(self, w)
#         self.textControl.setWidth(w / 2)
#
#     def setHeight(self, w):
#         xbmcgui.ControlButton.setHeight(self, w)
#         self.textControl.setHeight(w)
#
#     def setPosition(self, x, y):
#         xbmcgui.ControlButton.setPosition(self, x, y)
#         self.textControl.setPosition(x + self.getWidth() / 2, y)
#
#     def setText(self, text):
#         self.text = text
#         if self.isPassword:
#             self.textControl.setLabel("*" * len(self.text))
#         else:
#             self.textControl.setLabel(self.text)
#
#     def getText(self):
#         return self.text
#
#
# if not hasattr(xbmcgui, "ControlEdit"):
#     xbmcgui.ControlEdit = ControlEdit 
开发者ID:pelisalacarta-ce,项目名称:pelisalacarta-ce,代码行数:62,代码来源:renumbertools.py


注:本文中的xbmcgui.ControlEdit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。