您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
30 行
724 B
30 行
724 B
using System;
|
|
using UnityEngine;
|
|
|
|
namespace UnityEditor.Experimental.Rendering.Universal.Path2D.GUIFramework
|
|
{
|
|
internal abstract class HoveredControlAction : GUIAction
|
|
{
|
|
private Control m_HoveredControl;
|
|
|
|
public Control hoveredControl
|
|
{
|
|
get { return m_HoveredControl; }
|
|
}
|
|
|
|
public HoveredControlAction(Control control)
|
|
{
|
|
m_HoveredControl = control;
|
|
}
|
|
|
|
protected override bool CanTrigger(IGUIState guiState)
|
|
{
|
|
return guiState.nearestControl == hoveredControl.ID;
|
|
}
|
|
|
|
protected override void OnTrigger(IGUIState guiState)
|
|
{
|
|
m_HoveredControl.SetActionID(ID);
|
|
}
|
|
}
|
|
}
|