浏览代码

Make master preview dirty when mouse wheel is scrolled (zoom changes)

/main
Jens Holm 7 年前
当前提交
82db6687
共有 1 个文件被更改,包括 8 次插入6 次删除
  1. 14
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/MasterPreviewView.cs

14
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/MasterPreviewView.cs


Add(middleContainer);
}
void OnScroll(float scrollValue)
{
float rescaleAmount = -scrollValue * .03f;
m_Graph.previewData.scale = Mathf.Clamp(m_Graph.previewData.scale + rescaleAmount, 0.2f, 5f);
}
void BuildContextualMenu(ContextualMenuPopulateEvent evt)
{
foreach (var primitiveTypeName in Enum.GetNames(typeof(PrimitiveType)))

{
UnregisterCallback<PostLayoutEvent>(AdaptRenderTextureOnLayoutChange);
RefreshRenderTextureSize();
}
void OnScroll(float scrollValue)
{
float rescaleAmount = -scrollValue * .03f;
m_Graph.previewData.scale = Mathf.Clamp(m_Graph.previewData.scale + rescaleAmount, 0.2f, 5f);
DirtyMasterNode(ModificationScope.Node);
}
void OnMouseDragPreviewMesh(Vector2 deltaMouse)

正在加载...
取消
保存