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


Python xbmcgui.ControlButton方法代码示例

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


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

示例1: __init__

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def __init__(self, cookie, tokens, vcodetype, codeString, vcode_path):
        self.cookie = cookie
        self.tokens = tokens
        self.vcodetype = vcodetype
        self.codeString = codeString
        self.vcode_path = vcode_path

        # windowItems
        self.image = xbmcgui.ControlImage(80, 100, 500, 200, self.vcode_path)
        self.buttonInput = xbmcgui.ControlButton(
            100, 330, 220, 50, label=u'输入验证码', alignment=6, font='font13', textColor='0xFFFFFFFF'
        )
        self.buttonRefresh = xbmcgui.ControlButton(
            290, 330, 220, 50, label=u'刷新验证码', alignment=6, font='font13', textColor='0xFFFFFFFF'
        )
        self.addControls([self.image, self.buttonInput, self.buttonRefresh])
        self.buttonInput.controlRight(self.buttonRefresh)
        self.buttonRefresh.controlLeft(self.buttonInput)
        self.setFocus(self.buttonInput) 
开发者ID:taxigps,项目名称:xbmc-addons-chinese,代码行数:21,代码来源:get_auth.py

示例2: add_control_list

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def add_control_list(self, c):
        control = xbmcgui.ControlButton(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)

        label = xbmcgui.ControlLabel(0, -100, self.controls_width - 30, self.height_control,
                                     "", font=self.font, textColor=c["color"], alignment=4 | 1)

        upBtn = xbmcgui.ControlButton(0, -100, 20, 15, "",
                                      focusTexture=os.path.join(self.mediapath, 'Controls', 'spinUp-Focus.png'),
                                      noFocusTexture=os.path.join(self.mediapath, 'Controls', 'spinUp-noFocus.png'))

        downBtn = xbmcgui.ControlButton(0, -100 + 15, 20, 15, "",
                                        focusTexture=os.path.join(self.mediapath, 'Controls', 'spinDown-Focus.png'),
                                        noFocusTexture=os.path.join(self.mediapath, 'Controls', 'spinDown-noFocus.png'))

        self.addControl(control)
        self.addControl(label)
        self.addControl(upBtn)
        self.addControl(downBtn)

        control.setVisible(False)
        label.setVisible(False)
        upBtn.setVisible(False)
        downBtn.setVisible(False)
        label.setLabel(c["lvalues"][self.values[c["id"]]])

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

示例3: __new__

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def __new__(cls, *args, **kwargs):
        del kwargs["isPassword"]
        del kwargs["window"]
        args = list(args)
        return xbmcgui.ControlButton.__new__(cls, *args, **kwargs) 
开发者ID:alfa-addon,项目名称:addon,代码行数:7,代码来源:xbmc_config_menu.py

示例4: setLabel

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def setLabel(self, val):
        self.label = val
        xbmcgui.ControlButton.setLabel(self, val) 
开发者ID:alfa-addon,项目名称:addon,代码行数:5,代码来源:xbmc_config_menu.py

示例5: getX

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def getX(self):
        return xbmcgui.ControlButton.getPosition(self)[0] 
开发者ID:alfa-addon,项目名称:addon,代码行数:4,代码来源:xbmc_config_menu.py

示例6: getY

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def getY(self):
        return xbmcgui.ControlButton.getPosition(self)[1] 
开发者ID:alfa-addon,项目名称:addon,代码行数:4,代码来源:xbmc_config_menu.py

示例7: setWidth

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def setWidth(self, w):
        xbmcgui.ControlButton.setWidth(self, w)
        self.textControl.setWidth(old_div(w, 2)) 
开发者ID:alfa-addon,项目名称:addon,代码行数:5,代码来源:xbmc_config_menu.py

示例8: setHeight

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def setHeight(self, w):
        xbmcgui.ControlButton.setHeight(self, w)
        self.textControl.setHeight(w) 
开发者ID:alfa-addon,项目名称:addon,代码行数:5,代码来源:xbmc_config_menu.py

示例9: setPosition

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def setPosition(self, x, y):
        xbmcgui.ControlButton.setPosition(self, x, y)
        if xbmcgui.__version__ == "1.2":
            self.textControl.setPosition(x + self.getWidth(), y)
        else:
            self.textControl.setPosition(x + old_div(self.getWidth(), 2), y) 
开发者ID:alfa-addon,项目名称:addon,代码行数:8,代码来源:xbmc_config_menu.py

示例10: onInit

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def onInit(self):
		#xbmc.executebuiltin('ReplaceWindow(progressdialog)')
		#xbmc.executebuiltin('Dialog.Close(progressdialog)')
		#ctr=self.getControl(10101)
		#ctr.close()
		print 'lalalalal'
		st_x=250
		st_y=250
		y=1
		while (y<5):
			n=1
			while (n<15):
				self.label = xbmcgui.ControlButton(st_x+n*50, st_y+y*50, 50, 50, self.lns[y-1][n-1])
				if n==1: 
					self.label.setWidth(100)
					self.label.setPosition(st_x, st_y+y*50)
				if n==14: 
					self.label.setWidth(100)
					self.label.setPosition(st_x+n*50, st_y+y*50)
				self.label.setVisible(False)
				self.addControl(self.label)
				#print self.label.getId()
				n=n+1
			y=y+1
			
		id=3001
		y=1
		while (y<5):
			n=1
			while (n<15):
				self.label = self.getControl(3001+(n-1)+(y-1)*14)
				if n>1: self.label.controlLeft(self.getControl(3001+(n-1)+(y-1)*14-1))
				if y>1: self.label.controlUp(self.getControl(3001+(n-1)+(y-2)*14))
				if n<14: self.label.controlRight(self.getControl(3001+(n-1)+(y-1)*14+1))
				if y<4: self.label.controlDown(self.getControl(3001+(n-1)+(y)*14))
				#print self.label.getId()
				n=n+1
				self.label.setVisible(True)
			y=y+1
		pass
		# Put your List Populating code/ and GUI startup stuff here 
开发者ID:seppius-xbmc-repo,项目名称:ru,代码行数:43,代码来源:keyboard_ru.py

示例11: setFrame

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def setFrame(self, title):
        """
        Define paths to images for window background and title background textures,
        and set control position adjustment constants used in setGrid.
        This is a helper method not to be called directly.
        """
        # Window background image
        self.background_img = os.path.join(_images, 'AddonWindow', 'ContentPanel.png')
        # Background for a window header
        self.title_background_img = os.path.join(_images, 'AddonWindow', 'dialogheader.png')
        # Horisontal adjustment for a header background if the main background has transparent edges.
        self.X_MARGIN = 5
        # Vertical adjustment for a header background if the main background has transparent edges
        self.Y_MARGIN = 5
        # Header position adjustment if the main backround has visible borders.
        self.Y_SHIFT = 4
        # The height of a window header (for the title background and the title label).
        self.HEADER_HEIGHT = 35
        self.background = xbmcgui.ControlImage(-10, -10, 1, 1, self.background_img)
        self.addControl(self.background)
        self.setAnimation(self.background)
        self.title_background = xbmcgui.ControlImage(-10, -10, 1, 1, self.title_background_img)
        self.addControl(self.title_background)
        self.setAnimation(self.title_background)
        self.title_bar = xbmcgui.ControlLabel(-10, -10, 1, 1, title, alignment=ALIGN_CENTER, textColor='0xFFFFA500',
                                                                        font='font13_title')
        self.addControl(self.title_bar)
        self.setAnimation(self.title_bar)
        self.window_close_button = xbmcgui.ControlButton(-100, -100, 60, 30, '',
                        focusTexture=os.path.join(_images, 'AddonWindow', 'DialogCloseButton-focus.png'),
                        noFocusTexture=os.path.join(_images, 'AddonWindow', 'DialogCloseButton.png'))
        self.addControl(self.window_close_button)
        self.setAnimation(self.window_close_button) 
开发者ID:seppius-xbmc-repo,项目名称:ru,代码行数:35,代码来源:addonwindow.py

示例12: add_control_list

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def add_control_list(self, c):
        control = xbmcgui.ControlButton(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)

        label = xbmcgui.ControlLabel(0, -100, self.controls_width - 30, self.height_control,
                                     "", font=self.font, textColor=c["color"], alignment=4 | 1)

        upBtn = xbmcgui.ControlButton(0, -100, 20, 15, "",
                                      focusTexture=os.path.join(self.mediapath, 'Controls', 'spinUp-Focus.png'),
                                      noFocusTexture=os.path.join(self.mediapath, 'Controls', 'spinUp-noFocus.png'))

        downBtn = xbmcgui.ControlButton(0, -100 + 15, 20, 15, "",
                                        focusTexture=os.path.join(self.mediapath, 'Controls', 'spinDown-Focus.png'),
                                        noFocusTexture=os.path.join(self.mediapath, 'Controls', 'spinDown-noFocus.png'))


        self.addControl(control)
        self.addControl(label)
        self.addControl(upBtn)
        self.addControl(downBtn)

        control.setVisible(False)
        label.setVisible(False)
        upBtn.setVisible(False)
        downBtn.setVisible(False)
        label.setLabel(c["lvalues"][self.values[c["id"]]])

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

示例13: setWidth

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def setWidth(self, w):
        xbmcgui.ControlButton.setWidth(self, w)
        self.textControl.setWidth(w/2) 
开发者ID:pelisalacarta-ce,项目名称:pelisalacarta-ce,代码行数:5,代码来源:xbmc_config_menu.py

示例14: setPosition

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def setPosition(self, x, y):
        xbmcgui.ControlButton.setPosition(self, x, y)
        if xbmcgui.__version__ == "1.2":
          self.textControl.setPosition(x + self.getWidth(), y)
        else:
          self.textControl.setPosition(x + self.getWidth() / 2, y) 
开发者ID:pelisalacarta-ce,项目名称:pelisalacarta-ce,代码行数:8,代码来源:xbmc_config_menu.py

示例15: _place_window

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ControlButton [as 别名]
def _place_window(self, width, height, title):
        """ Main window drawing """

        X_MARGIN = 5    # Horisontal adjustment for a header background if the main background has transparent edges. 
        Y_MARGIN = 5    # Vertical adjustment for a header background if the main background has transparent edges  
        Y_SHIFT = 4     # Header position adjustment if the main backround has visible borders.
        HEADER_HEIGHT = 35  # The height of a window header (for the title background and the title label).


        background_img = os.path.join(_images, 'AddonWindow', 'ContentPanel.png')
        background = xbmcgui.ControlImage(self.x, self.y, width, height, background_img)
        
        title_background_img = os.path.join(_images, 'AddonWindow', 'dialogheader.png')
        title_background = xbmcgui.ControlImage(self.x + X_MARGIN, self.y + Y_MARGIN, width - 2 * X_MARGIN, HEADER_HEIGHT, title_background_img)
        
        title_bar = xbmcgui.ControlLabel(self.x + X_MARGIN, self.y + Y_MARGIN + Y_SHIFT, width - 2 * X_MARGIN, HEADER_HEIGHT,
                                         title, alignment=ALIGN_CENTER, textColor='0xFFFFA500', font='font13_title')
        
        self.window_close_button = xbmcgui.ControlButton(self.x + width - 70, self.y + Y_MARGIN + Y_SHIFT, 60, 30, '',
                        focusTexture=os.path.join(_images, 'AddonWindow', 'DialogCloseButton-focus.png'),
                        noFocusTexture=os.path.join(_images, 'AddonWindow', 'DialogCloseButton.png'))
        
        self.addControl(background)
        self.addControl(title_background)
        self.addControl(title_bar)
        self.addControl(self.window_close_button) 
开发者ID:maikito26,项目名称:plugin.video.surveillanceroom,代码行数:28,代码来源:camerasettings.py


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