Unity2017.1官方UGUI文档翻译——Transition Options

Transition Options

转换选项

Within a selectable component there are several transition options depending on what state the selectable is currently in. The different states are: normal, highlighted, pressed and disabled.
在一个selectable组件中(比如button就继承自selectable,他就算是一个selectable组件),根据当前selectable组件的状态,有几个转换选项。不同的状态是:normal, highlighted, pressed 和 disabled.

Transition Options:Function:
NoneThis option is for the button to have no state effects at all.
Color Tint

Changes the colour of the button depending on what state it is in. It is possible to select the colour for each individual state.

It is also possible to set the Fade Duration between the different states. The higher the number is, the slower the fade between colors will be.

Sprite SwapAllows different sprites to display depending on what state the button is currently in, the sprites can be customised.
Animation

Allows animations to occur depending on the state of the button, an animator component must exist in order to use animation transition.

It’s important to make sure root motion is disabled.

To create an animation controller click on generate animation (or create your own) and

make sure that an animation controller has been added to the animator component of the button.

转换选项功能
None这个选项是让按钮没有任何状态效果
Color Tint

根据所处的状态更改按钮的颜色。可以为每个单独的状态选择颜色。

也可以在不同状态之间设置淡变持续时间。

数字越高,颜色之间的渐变就越慢

Sprite Swap允许显示不同的精灵,取决于按钮当前处于什么状态,精灵可以自定义
Animation

允许根据按钮的状态播放动画,animator组件必须存在才能使用动画转换。

很重要的一点是要确保root motion处于禁用状态。

要创建动画控制器,请单击生成动画(或创建自己的动画),并确保动画控制器已添加到按钮的动画组件中

 

Each Transition option (except None) provides additional options for controlling the transitions. We’ll go into details with those in each of the sections below.

每个转换选项(None除外)都提供了用于控制转换的附加选项。 我们将在下面阐述每种转换的细节

Color Tint

颜色提示

Property:Function:
Target GraphicThe graphic used for the interaction component.
Normal ColorThe normal color of the control
Highlighted ColorThe color of the control when it is highlighted
Pressed ColorThe color of the control when it is pressed
Disabled ColorThe color of the control when it is disabled
Color Multiplier

This multiplies the tint color for each transition by its value.

With this you can create colors greater than 1 to brighten the colors (or alpha channel)

on graphic elements whose base color is less than white (or less then full alpha).

Fade DurationThe time taken, in seconds, to fade from one state to another
属性功能
Target Graphic用于交互组件的图形
Normal Color控件正常状态的颜色
Highlighted Color控件突出显示时的颜色
Pressed Color控件按下时的颜色
Disabled Color控件禁用时的颜色
Color Multiplier每个状态的颜色都会乘以它,后面那一坨没必要翻译了,都是废话-。-(注意color的rgba值的取值范围为0~1)
Fade Duration

从一种状态到另一种状态的时间,以秒为单位

 

Sprite Swap

精灵交换

Property:Function:
Target GraphicThe normal sprite to use
Highlighted SpriteSprite to use when the control is highlighted
Pressed SpriteSprite to use when the control is pressed
Disabled SpriteSprite to use when the control is disabled
属性功能
Target Graphic正常状态的精灵
Highlighted Sprite突出状态的精灵
Pressed Sprite按下状态的精灵
Disabled Sprite禁用状态的精灵

 

Animation

动画

 

Property:Function:
Normal TriggerThe normal animation trigger to use
Highlighted TriggerTrigger to use when the control is highlighted
Pressed TriggerTrigger to use when the control is pressed
Disabled TriggerTrigger to use when the control is disabled

属性功能
Normal Trigger动画正常状态的trigger(trigger的定义见Animator)
Highlighted Trigger动画突出状态的trigger(trigger的定义见Animator)
Pressed Trigger动画按下状态的trigger(trigger的定义见Animator)
Disabled Trigger动画禁用状态的trigger(trigger的定义见Animator)

转载于:https://www.cnblogs.com/SolarWings/p/8185542.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值