浏览代码

Make floating windows not rescale when parent window becomes too small to fit them

/main
Jens Holm 7 年前
当前提交
9696454d
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/WindowDraggable.cs

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Manipulators/WindowDraggable.cs


}
}
void OnMouseUp(MouseUpEvent evt)
{
bool emitDragFinishedEvent = m_Active;

}
else
{
windowRect.y = (1f - normalizedDistanceFromEdge.y) * target.parent.layout.height- windowRect.height;
windowRect.y = (1f - normalizedDistanceFromEdge.y) * target.parent.layout.height - windowRect.height;
windowRect.width = Mathf.Max(Mathf.Min(windowRect.width, target.parent.layout.width), minSize.x);
windowRect.height = Mathf.Max(Mathf.Min(windowRect.height, target.parent.layout.height), minSize.y);
windowRect.width = Mathf.Max(windowRect.width, minSize.x);
windowRect.height = Mathf.Max(windowRect.height, minSize.y);
float maximumXPosition = Mathf.Max(target.parent.layout.width - windowRect.width, 0f);
float maximumYPosition = Mathf.Max(target.parent.layout.height - windowRect.height, 0f);

正在加载...
取消
保存