您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
35 行
845 B
35 行
845 B
using UnityEngine.UI;
|
|
|
|
namespace UnityEngine.Rendering.UI
|
|
{
|
|
public class DebugUIHandlerButton : DebugUIHandlerWidget
|
|
{
|
|
public Text nameLabel;
|
|
|
|
DebugUI.Button m_Field;
|
|
|
|
internal override void SetWidget(DebugUI.Widget widget)
|
|
{
|
|
base.SetWidget(widget);
|
|
m_Field = CastWidget<DebugUI.Button>();
|
|
nameLabel.text = m_Field.displayName;
|
|
}
|
|
|
|
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
|
|
{
|
|
nameLabel.color = colorSelected;
|
|
return true;
|
|
}
|
|
|
|
public override void OnDeselection()
|
|
{
|
|
nameLabel.color = colorDefault;
|
|
}
|
|
|
|
public override void OnAction()
|
|
{
|
|
if (m_Field.action != null)
|
|
m_Field.action();
|
|
}
|
|
}
|
|
}
|