已处理 UI载体的全局透明度

状态
不接受进一步回复。
现在可以实现的其实..
主要通过Yaml锚点的调用和组件data实现
YAML:
扩展 折叠 复制
全局透明度: &透明度 0.8

controls:
  转data:
    val: "data"
    type: Canvas
    attribute:
      alpha: *透明度
  adaptive:
    type: adaptive
    attribute:
      point: ~bottom_left
      width: 1920
      height: 1080
    children:
      组件:
        type: texture
        attribute:
          width: 700
          height: 400
          normal: ~255,255,255
          alpha: 0.8*val.data.alpha
 
现在可以实现的其实..
主要通过Yaml锚点的调用和组件data实现
YAML:
扩展 折叠 复制
全局透明度: &透明度 0.8

controls:
  转data:
    val: "data"
    type: Canvas
    attribute:
      alpha: *透明度
  adaptive:
    type: adaptive
    attribute:
      point: ~bottom_left
      width: 1920
      height: 1080
    children:
      组件:
        type: texture
        attribute:
          width: 700
          height: 400
          normal: ~255,255,255
          alpha: 0.8*val.data.alpha
这样当然可以解决问题,但不可避免的需要向所有组件手动添加alpha属性
 
状态
不接受进一步回复。