From 0662788cf0294223ef6e0364e51764983d9b7d67 Mon Sep 17 00:00:00 2001 From: "Simon (darkside) Jackson" Date: Thu, 10 Sep 2015 22:54:29 +0100 Subject: [PATCH 1/4] Back ported fixes from 5.2 work Also refactored and renamed the old UI Button control to a more generic Selectable extension --- Scripts/AimerInputModule.cs | 4 - Scripts/Editor/UIExtensionsMenuOptions.cs | 3 +- Scripts/UIButton.cs | 58 --------- Scripts/UILineRenderer.cs | 2 +- Scripts/UILineTextureRenderer.cs | 2 +- Scripts/UISelectableExtension.cs | 112 ++++++++++++++++++ ....cs.meta => UISelectableExtension.cs.meta} | 2 +- 7 files changed, 117 insertions(+), 66 deletions(-) delete mode 100644 Scripts/UIButton.cs create mode 100644 Scripts/UISelectableExtension.cs rename Scripts/{UIButton.cs.meta => UISelectableExtension.cs.meta} (78%) diff --git a/Scripts/AimerInputModule.cs b/Scripts/AimerInputModule.cs index 10a62b9..2f00b8a 100644 --- a/Scripts/AimerInputModule.cs +++ b/Scripts/AimerInputModule.cs @@ -1,10 +1,6 @@ /// Credit Chris Trueman /// Sourced from - http://forum.unity3d.com/threads/use-reticle-like-mouse-for-worldspace-uis.295271/ -using UnityEngine; -using UnityEngine.EventSystems; -using System.Collections.Generic; - namespace UnityEngine.EventSystems.Extensions { [RequireComponent(typeof(EventSystem))] diff --git a/Scripts/Editor/UIExtensionsMenuOptions.cs b/Scripts/Editor/UIExtensionsMenuOptions.cs index 6faa789..79e1197 100644 --- a/Scripts/Editor/UIExtensionsMenuOptions.cs +++ b/Scripts/Editor/UIExtensionsMenuOptions.cs @@ -362,7 +362,8 @@ namespace UnityEditor.UI image.type = Image.Type.Sliced; image.color = s_DefaultSelectableColor; - UIButton bt = uiButtonRoot.AddComponent(); + Button bt = uiButtonRoot.AddComponent