图形用户界面的实验特征#
- class arcade.gui.experimental.UIPasswordInput(*, x: float = 0, y: float = 0, width: float = 100, height: float = 24, text: str = '', font_name=('Arial',), font_size: float = 12, text_color: Tuple[int, int, int] | Tuple[int, int, int, int] = (0, 0, 0, 255), multiline=False, caret_color: Tuple[ChannelType, ChannelType, ChannelType] = (0, 0, 0), size_hint=None, size_hint_min=None, size_hint_max=None, **kwargs)[源代码]#
基类:
UIInputText
密码输入字段。文本用星号隐藏。
- class arcade.gui.experimental.UIScrollArea(*, x: float = 0, y: float = 0, width: float = 300, height: float = 300, children: Iterable[UIWidget] = (), size_hint=None, size_hint_min=None, size_hint_max=None, canvas_size=(300, 300), **kwargs)[源代码]#
基类:
UIWidget
一个可以滚动其子项的小工具。
- invert_scroll = False#
- scroll_speed = 1.3#
- scroll_x#
当改变时触发观察者的一种可观察的属性。
def log_change(instance, value): print("Something changed") class MyObject: name = Property() my_obj = MyObject() bind(my_obj, "name", log_change) unbind(my_obj, "name", log_change) my_obj.name = "Hans" # > Something changed :param default: Default value which is returned, if no value set before :param default_factory: A callable which returns the default value. Will be called with the property and the instance
- scroll_y#
当改变时触发观察者的一种可观察的属性。
def log_change(instance, value): print("Something changed") class MyObject: name = Property() my_obj = MyObject() bind(my_obj, "name", log_change) unbind(my_obj, "name", log_change) my_obj.name = "Hans" # > Something changed :param default: Default value which is returned, if no value set before :param default_factory: A callable which returns the default value. Will be called with the property and the instance