浏览代码

fix right buttons highlighted

/main
RSlysz 6 年前
当前提交
9457cf40
共有 1 个文件被更改,包括 4 次插入8 次删除
  1. 12
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Drawers.cs

12
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Drawers.cs


static internal void Drawer_ToolBarButton(ToolBar button, Editor owner, params GUILayoutOption[] options)
{
//[TODO] change style here
GUIStyle style = "EditModeSingleButton";
Rect rect = GUILayoutUtility.GetRect(toolbar_Contents[button], style, options);
bool isMouseOver = rect.Contains(Event.current.mousePosition);
bool isActive = EditMode.editMode == toolbar_Mode[button];
//style.Draw(rect, toolbar_Contents[button], isMouseOver && (GUI.enabled || isActive) && (isActive || GUIUtility.hotControl == 0), GUI.enabled && isActive, true, false);
if (GUILayout.Button(toolbar_Contents[button], options))
bool enabled = toolbar_Mode[button] == EditMode.editMode;
EditorGUI.BeginChangeCheck();
enabled = GUILayout.Toggle(enabled, toolbar_Contents[button], EditorStyles.miniButton, options);
if (EditorGUI.EndChangeCheck())
{
EditMode.SceneViewEditMode targetMode = EditMode.editMode == toolbar_Mode[button] ? EditMode.SceneViewEditMode.None : toolbar_Mode[button];
EditMode.ChangeEditMode(targetMode, GetBoundsGetter(owner)(), owner);

正在加载...
取消
保存