本文整理汇总了Python中kytten.widgets.Control.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Control.__init__方法的具体用法?Python Control.__init__怎么用?Python Control.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kytten.widgets.Control
的用法示例。
在下文中一共展示了Control.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
def __init__(self, width, height, disabled=False):
"""
Blocks occupy a fixed width and height.
@param width Width
@param height Height
"""
Control.__init__(self, width=width, height=height, disabled=disabled)
self.color = None
self.vertex_list = None
self.is_dragging = False
示例2: __init__
# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
def __init__(self, id, image, scale_size=None, anchor=ANCHOR_CENTER,
palette=None, disabled=False, padding=0):
Control.__init__(self, disabled=disabled)
self.id = id
self.image = image
self.scale_size = scale_size
self.anchor = anchor
self.palette = palette
self.sprite = None
self.background = None
self.highlight = None
self.is_selected = False
self.padding = padding
示例3: __init__
# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
def __init__(self, texture, x=0, y=0, width=0, height=0, scale=1,
on_resize=None):
Control.__init__(self)
self.texture = texture
self.on_resize = on_resize
self.texture_group = None
self.texture_vlist = None
self.resizer_vlist = None
self.limits_vlist = None
self.region = [x, y, width, height]
self.limits = None
self.scale = scale
self.color = self.IMAGE_REGION_COLOR
self.is_dragging = False
self.corner = None
示例4: __init__
# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
def __init__(self, color, width=16, height=16, id=None, on_select=None):
Control.__init__(self, id=id)
self.color = color
self.content_width = width
self.content_height = height
self.swatch_label = None
self.swatch = None
self.vlist = None
self.on_select = on_select
self.select_dialog = None
self.wheel = None
self.red_input = None
self.green_input = None
self.blue_input = None
self.slider = None
self.accept_button = None
self.cancel_button = None
示例5: __init__
# 需要导入模块: from kytten.widgets import Control [as 别名]
# 或者: from kytten.widgets.Control import __init__ [as 别名]
def __init__(self, color, id=None, on_select=None):
Control.__init__(self, id=id)
self.alpha = color[3]
self.tip_color = [0, 0, 0]
self.on_select = on_select
self.circle_vlist = None
self.inner_circle_vlist = None
self.inner_circle_bg_vlist = None
self.colors_vlist = None
self.triangle_vlist = None
self.crosshair = None
self.tri_angle = 0.0
self.point = (0, 0)
self.is_turning = False
self.is_dragging = False
self.center_x = 0
self.center_y = 0
self.pointer_i = 1.0
self.pointer_j = 0.0
self.vector_i = [0, 1]
self.vector_j = [1, 0]
self.point_a = [0, 0]
self.set_color(color)