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
*.unitypackage
/.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:
## [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.

View File

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

View File

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

View File

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

View File

@ -1,29 +1,24 @@
/// Credit SimonDarksideJ
using UnityEngine.EventSystems;
namespace UnityEngine.UI.Extensions
{
/*
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).
Now whenever the cursor leaves the component, it will force the UI component to revert to un-highlighted.
*/
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
/// <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.
/// 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.
/// </summary>
[AddComponentMenu("UI/Extensions/ResetSelectableHighlight", 31)]
[RequireComponent(typeof(Selectable))]
public class ResetSelectableHighlight : MonoBehaviour, IPointerExitHandler
{
[SerializeField]
private Selectable attachedSelectable;
private Selectable attachedSelectable = null;
// Start is called before the first frame update
void Awake()
private void Awake()
{
if (!attachedSelectable)
if (attachedSelectable == null || !attachedSelectable)
{
attachedSelectable = GetComponent<Selectable>();
}
@ -31,7 +26,12 @@ namespace UnityEngine.UI.Extensions
public void OnPointerExit(PointerEventData eventData)
{
if (!attachedSelectable.interactable)
{
return;
}
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
{
// Use this for initialization
void Start()
{
public class TestCompression : MonoBehaviour {
}
// Use this for initialization
void Start () {
// Update is called once per frame
void Update()
{
}
}
// Update is called once per frame
void Update () {
}
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.unity.uiextensions",
"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",
"author": "Simon darkside Jackson <@SimonDarksideJ>",
"contributors": [