图形用户界面风格#

arcade.experimental.uistyle 是一个实验性组件,在即将到来的版本中可能会发生变化。

arcade.experimental.uistyle 提供样式词典,可在 UIWidget 要提供默认外观的颜色,请执行以下操作。

样式参数#

UIWidget 从类似DICT的对象加载样式参数,它可以作为 UIWidget.style

样式参数#

以下参数用于多个 UIWidget 。样式参数带有前缀 UIWidget 状态 (normalhoveredpressed )

<state>_font_size

中的任何文本的字体大小 UIWidget

<state>_font_name

中的任何文本的字体 UIWidget

<state>_font_color

中的任何文本的颜色 UIWidget

<state>_bg

背景色,也用作 UIWidget

<state>_border

颜色: UIWidget 边境线

<state>_border_width

宽度 UIWidget 以像素为单位的边框

<state>_filled_bar

条形图中使用的颜色,如滑块,用于指示填充状态

<state>_unfilled_bar

条形图中使用的颜色,如未填充背景的滑块

UIWidget样式#

UISlider#

  • <state>_filled_bar

  • <state>_unfilled_bar

  • <state>_bg -光标的颜色

  • <state>_border -光标轮廓

  • <state>_border_width

UIFlatButton#

  • <state>_font_name

  • <state>_font_size

  • <state>_font_color

  • <state>_bg

  • <state>_border

  • <state>_border_width