Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
robertobrambila committed May 27, 2020
2 parents b9472fa + 00d3d67 commit d8227f0
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Assets/Editor/FS_UnitySceneTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ private static void ShowWindow() {

void Awake()
{

// check to see if we're already docked in the scene, if so enable mousemove to allow for correct window repaint
var window = GetWindow<FS_UnitySceneTools>();
if (window != null)
{
window.wantsMouseMove = true;
}

normalTexture = (Texture)AssetDatabase.LoadAssetAtPath("Assets/Editor Default Resources/fs_unityscenetools/normal_40x40.png", typeof(Texture));
pressedTexture = (Texture)AssetDatabase.LoadAssetAtPath("Assets/Editor Default Resources/fs_unityscenetools/pressed_40x40.png", typeof(Texture));
Expand Down Expand Up @@ -130,8 +123,7 @@ void Awake()
}

private void OnGUI() {
// force repaint window on mouse move so hover image states work correctly
if (Event.current.type == EventType.MouseMove) Repaint();
forceRepaint();

if (verticalLayoutDirection)
{
Expand Down Expand Up @@ -319,5 +311,12 @@ private void OnGUI() {
}
GUILayout.EndArea();
}

private void forceRepaint()
{
// force repaint window on mouse move so hover image states work correctly
var window = GetWindow<FS_UnitySceneTools>();
if (Event.current.type == EventType.MouseMove) Repaint();
}
}
}

0 comments on commit d8227f0

Please sign in to comment.