本文整理汇总了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
示例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
示例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
示例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
示例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
示例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
示例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