pull/435/head
SimonDarksideJ 2023-03-12 11:43:06 +00:00
commit 3e8eaa0643
9 changed files with 45 additions and 36 deletions

2
.gitignore vendored
View File

@ -33,3 +33,5 @@ sysinfo.txt
*.apk *.apk
*.unitypackage *.unitypackage
/.vs /.vs
**/node_modules/*

@ -1 +1 @@
Subproject commit 774bde78bf8792ad8de1c96ad7e874932fd716d7 Subproject commit 2b2dba57650838e285c3336b4a26847931462570

View File

@ -29,7 +29,7 @@ In this repository is a collection of extension scripts / effects and controls t
You can either download / fork this project to access the scripts, or you can also download these pre-compiled Unity Assets, chock full of goodness for each release: You can either download / fork this project to access the scripts, or you can also download these pre-compiled Unity Assets, chock full of goodness for each release:
## [Download - 2019.6 (aka 2.5)](https://unity-ui-extensions.github.io/Downloads) ## [Download Latest - Version 2.3](https://unity-ui-extensions.github.io/Downloads)
We have expanded where you can download the UnityPackage asset and widened the options to contribute to the project. We have expanded where you can download the UnityPackage asset and widened the options to contribute to the project.

View File

@ -1,9 +1,11 @@
using System; using System;
using UnityEngine;
using UnityEngine.Events; using UnityEngine.Events;
namespace UnityEngine.UI.Extensions.ColorPicker
{
[Serializable] [Serializable]
public class ColorChangedEvent : UnityEvent<Color> public class ColorChangedEvent : UnityEvent<Color>
{ {
} }
}

View File

@ -1,6 +1,9 @@
using UnityEngine.Events; using UnityEngine.Events;
namespace UnityEngine.UI.Extensions.ColorPicker
{
public class HSVChangedEvent : UnityEvent<float, float, float> public class HSVChangedEvent : UnityEvent<float, float, float>
{ {
} }
}

View File

@ -3,7 +3,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using static UnityEditor.Progress;
namespace UnityEngine.UI.Extensions namespace UnityEngine.UI.Extensions
{ {

View File

@ -1,29 +1,24 @@
/// Credit SimonDarksideJ /// Credit SimonDarksideJ
using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions namespace UnityEngine.UI.Extensions
{ {
/* /// <summary>
Handy Selectable script to un-highlight a selectable component in Unity (e.g. a Button) when the user moves away from it, EVEN IF the user has holding a button on it. /// Handy Selectable script to un-highlight a selectable component in Unity (e.g. a Button) when the user moves away from it, EVEN IF the user has holding a button on it.
/// Resolves the situation where Unity UI Components remain in a highlighted state even after the pointer has moved away (e.g. user holding a button, mouse, pointer down).
Resolves the situation where Unity UI Components remain in a highlighted state even after the pointer has moved away (e.g. user holding a button, mouse, pointer down). /// Now whenever the cursor leaves the component, it will force the UI component to revert to un-highlighted.
Now whenever the cursor leaves the component, it will force the UI component to revert to un-highlighted. /// </summary>
*/
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
[AddComponentMenu("UI/Extensions/ResetSelectableHighlight", 31)] [AddComponentMenu("UI/Extensions/ResetSelectableHighlight", 31)]
[RequireComponent(typeof(Selectable))] [RequireComponent(typeof(Selectable))]
public class ResetSelectableHighlight : MonoBehaviour, IPointerExitHandler public class ResetSelectableHighlight : MonoBehaviour, IPointerExitHandler
{ {
[SerializeField] [SerializeField]
private Selectable attachedSelectable; private Selectable attachedSelectable = null;
// Start is called before the first frame update private void Awake()
void Awake()
{ {
if (!attachedSelectable) if (attachedSelectable == null || !attachedSelectable)
{ {
attachedSelectable = GetComponent<Selectable>(); attachedSelectable = GetComponent<Selectable>();
} }
@ -31,6 +26,11 @@ namespace UnityEngine.UI.Extensions
public void OnPointerExit(PointerEventData eventData) public void OnPointerExit(PointerEventData eventData)
{ {
if (!attachedSelectable.interactable)
{
return;
}
attachedSelectable.targetGraphic.CrossFadeColor(attachedSelectable.colors.normalColor, 0f, true, true); attachedSelectable.targetGraphic.CrossFadeColor(attachedSelectable.colors.normalColor, 0f, true, true);
} }
} }

View File

@ -1,14 +1,17 @@
using UnityEngine; namespace UnityEngine.UI.Extensions
{
public class TestCompression : MonoBehaviour { public class TestCompression : MonoBehaviour
{
// Use this for initialization // Use this for initialization
void Start () { void Start()
{
} }
// Update is called once per frame // Update is called once per frame
void Update () { void Update()
{
} }
} }
}

View File

@ -1,7 +1,7 @@
{ {
"name": "com.unity.uiextensions", "name": "com.unity.uiextensions",
"displayName": "Unity UI Extensions", "displayName": "Unity UI Extensions",
"version": "2.3.0", "version": "2.3.1.pre.1",
"description": "An extension project for the Unity3D UI system, all crafted and contributed by the awesome Unity community", "description": "An extension project for the Unity3D UI system, all crafted and contributed by the awesome Unity community",
"author": "Simon darkside Jackson <@SimonDarksideJ>", "author": "Simon darkside Jackson <@SimonDarksideJ>",
"contributors": [ "contributors": [