From 407d13f4cac840d6bdd83f4100261335e28448d7 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 11 Aug 2015 16:06:50 +0100 Subject: [PATCH] Added Set Mouse Cursor command and drag and drop support --- Assets/Fungus/Sprite/Scripts/Clickable2D.cs | 31 ++++++- .../Sprite/Scripts/Commands/SetMouseCursor.cs | 53 +++++++++++ .../Scripts/Commands/SetMouseCursor.cs.meta | 12 +++ Assets/Fungus/Sprite/Scripts/Draggable2D.cs | 24 ++++- Assets/Fungus/Sprite/Sprites/HandPointer.png | Bin 0 -> 7096 bytes .../Sprite/Sprites/HandPointer.png.meta | 55 ++++++++++++ Assets/Fungus/Sprite/Sprites/MousePointer.png | Bin 0 -> 4277 bytes .../Sprite/Sprites/MousePointer.png.meta | 55 ++++++++++++ .../DragAndDrop/DragAndDrop.unity | 85 +++++++++++++++++- 9 files changed, 306 insertions(+), 9 deletions(-) create mode 100644 Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs create mode 100644 Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs.meta create mode 100644 Assets/Fungus/Sprite/Sprites/HandPointer.png create mode 100644 Assets/Fungus/Sprite/Sprites/HandPointer.png.meta create mode 100644 Assets/Fungus/Sprite/Sprites/MousePointer.png create mode 100644 Assets/Fungus/Sprite/Sprites/MousePointer.png.meta diff --git a/Assets/Fungus/Sprite/Scripts/Clickable2D.cs b/Assets/Fungus/Sprite/Scripts/Clickable2D.cs index b7f68658..6b76ea14 100644 --- a/Assets/Fungus/Sprite/Scripts/Clickable2D.cs +++ b/Assets/Fungus/Sprite/Scripts/Clickable2D.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using UnityEngine.Events; using System.Collections; @@ -9,12 +9,15 @@ namespace Fungus * The Game Object must have a Collider2D component attached. * Use in conjunction with the ObjectClicked Flowchart event handler. */ - public class Clickable2D : MonoBehaviour + public class Clickable2D : MonoBehaviour { [Tooltip("Is object clicking enabled")] public bool clickEnabled = true; - void OnMouseDown() + [Tooltip("Mouse texture to use when hovering mouse over object")] + public Texture2D hoverCursor; + + protected virtual void OnMouseDown() { if (!clickEnabled) { @@ -28,6 +31,26 @@ namespace Fungus handler.OnObjectClicked(this); } } + + protected virtual void OnMouseEnter() + { + changeCursor(hoverCursor); + } + + protected virtual void OnMouseExit() + { + SetMouseCursor.ResetMouseCursor(); + } + + protected virtual void changeCursor(Texture2D cursorTexture) + { + if (!clickEnabled) + { + return; + } + + Cursor.SetCursor(cursorTexture, Vector2.zero, CursorMode.Auto); + } } -} \ No newline at end of file +} diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs b/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs new file mode 100644 index 00000000..c7e99ce5 --- /dev/null +++ b/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs @@ -0,0 +1,53 @@ +using UnityEngine; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Sprite", + "Set Mouse Cursor", + "Sets the mouse cursor sprite.")] + [AddComponentMenu("")] + public class SetMouseCursor : Command + { + [Tooltip("Texture to use for cursor. Will use default mouse cursor if no sprite is specified")] + public Texture2D cursorTexture; + + [Tooltip("The offset from the top left of the texture to use as the target point")] + public Vector2 hotSpot; + + // Cached static cursor settings + protected static Texture2D activeCursorTexture; + protected static Vector2 activeHotspot; + + public static void ResetMouseCursor() + { + // Change mouse cursor back to most recent settings + Cursor.SetCursor(activeCursorTexture, activeHotspot, CursorMode.Auto); + } + + public override void OnEnter() + { + Cursor.SetCursor(cursorTexture, hotSpot, CursorMode.Auto); + + activeCursorTexture = cursorTexture; + activeHotspot = hotSpot; + + Continue(); + } + + public override string GetSummary() + { + if (cursorTexture == null) + { + return "Error: No cursor sprite selected"; + } + + return cursorTexture.name; + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + } +} \ No newline at end of file diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs.meta b/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs.meta new file mode 100644 index 00000000..688a391f --- /dev/null +++ b/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fb6f88496f37c444a91acef47749f723 +timeCreated: 1439302629 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Sprite/Scripts/Draggable2D.cs b/Assets/Fungus/Sprite/Scripts/Draggable2D.cs index c67c03d3..73c9697b 100644 --- a/Assets/Fungus/Sprite/Scripts/Draggable2D.cs +++ b/Assets/Fungus/Sprite/Scripts/Draggable2D.cs @@ -22,8 +22,10 @@ namespace Fungus [Tooltip("Time object takes to return to its starting position")] public float returnDuration = 1f; - protected Vector3 startingPosition; + [Tooltip("Mouse texture to use when hovering mouse over object")] + public Texture2D hoverCursor; + protected Vector3 startingPosition; protected bool updatePosition = false; protected Vector3 newPosition; @@ -142,6 +144,26 @@ namespace Fungus // TODO: Cache these object for faster lookup return GameObject.FindObjectsOfType(); } + + protected virtual void OnMouseEnter() + { + changeCursor(hoverCursor); + } + + protected virtual void OnMouseExit() + { + SetMouseCursor.ResetMouseCursor(); + } + + protected virtual void changeCursor(Texture2D cursorTexture) + { + if (!dragEnabled) + { + return; + } + + Cursor.SetCursor(cursorTexture, Vector2.zero, CursorMode.Auto); + } } } diff --git a/Assets/Fungus/Sprite/Sprites/HandPointer.png b/Assets/Fungus/Sprite/Sprites/HandPointer.png new file mode 100644 index 0000000000000000000000000000000000000000..7a8eeae29fccf7f977bcd026bb36d4e1aa52b5bd GIT binary patch literal 7096 zcmWkz1ymGW6rQEKTco7~>F$ycSW3D}Lb{gja*>ddE@>(0SOgJ}5)h>uq+=;*_~$=o zXXecA%$xV_yk4a008h+RTOo=qb#_oVPSxK+*6%4@PO^EV&ny$k^a9y zfb3i<0KjQit0sNp$fT~9L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r& zFsZV#Qh&L>QXki%4g|0k6%~a;y3_~Xr~@@*Vns!T{+_Iz3AxljfVkq~;>06Ij<~}h z^Nj!mh$|^6Nh~WX(<5C#t`UF$apmRZFIQDnX~`#w@7S?J1OkDV=F#0YL;bh&xd(;Y?e_Qe^^K^PVJe}cD6y+oua1fEE%V!4BRJXC z*5=O0$cP&q9W`CNc+u;0I+Fk;CMIUtp+kqfyLaynN%zuEz|VkXuInZ6L`zalXIM*1 zOUHx|&qVk#+1A$f1Q^lUCnhF(g%EzN!T9+2a6&?YoI?J7soqIMdwcuf)~#D@z;dn9 z>-E}h+_*8lZCS0>_{_}AkhE-U1>RUF@*-&k+6j0avbE`IpUR z>(}AhpVRlW)GqMg!Gj^`GLLWBvc;ntD`i2zFvpKC=23!&TX_9==Ye@EwB zqu3{PzBA8>c3c``{O;Ym9_ca%)6>)SlV#Oh27eQ{$-@3|y;24^olcJsBB%-P-Mi;u zD%q~Jsfor*&>aadGB`NslcG4bX3d%*>AZIl-iKaT-je_mM~@!$XxpX`LUeU?>6e_0 zXhiX$21rd!^{P8dNC@G(aN)v3b;fJJU({7(NlTdoc-GX^^thp+VbI}lX!#iZTDxqi zfv@NQ-l<%Iibv^|y0`EjIqrqEYV1KF^)l>{pPN+*s2e54+1N}Du X<_309PsgL*00000NkvXXu0mjfUXUH_ literal 0 HcmV?d00001 diff --git a/Assets/Fungus/Sprite/Sprites/MousePointer.png.meta b/Assets/Fungus/Sprite/Sprites/MousePointer.png.meta new file mode 100644 index 00000000..e1ce5ce1 --- /dev/null +++ b/Assets/Fungus/Sprite/Sprites/MousePointer.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 502e0c9b755f34db0b90bf78857d8a1c +timeCreated: 1439303347 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusExamples/DragAndDrop/DragAndDrop.unity b/Assets/FungusExamples/DragAndDrop/DragAndDrop.unity index 6a5e22ed..0103f437 100644 --- a/Assets/FungusExamples/DragAndDrop/DragAndDrop.unity +++ b/Assets/FungusExamples/DragAndDrop/DragAndDrop.unity @@ -130,6 +130,14 @@ Prefab: propertyPath: m_Name value: ClickableSprite1 objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 0e6bcf37a2876432fa58eff8888bf177, type: 2} + propertyPath: hoverOverCursorTexture + value: + objectReference: {fileID: 2800000, guid: 22eb050bacf8c401ca8503e24bff3570, type: 3} + - target: {fileID: 11400000, guid: 0e6bcf37a2876432fa58eff8888bf177, type: 2} + propertyPath: hoverCursor + value: + objectReference: {fileID: 2800000, guid: 22eb050bacf8c401ca8503e24bff3570, type: 3} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 0e6bcf37a2876432fa58eff8888bf177, type: 2} m_IsPrefabParent: 0 @@ -205,6 +213,7 @@ Camera: m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: .0219999999 + m_StereoMirrorMode: 0 --- !u!4 &268187672 Transform: m_ObjectHideFlags: 0 @@ -371,6 +380,14 @@ Prefab: propertyPath: m_Name value: ClickableSprite2 objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 0e6bcf37a2876432fa58eff8888bf177, type: 2} + propertyPath: hoverOverCursorTexture + value: + objectReference: {fileID: 2800000, guid: 22eb050bacf8c401ca8503e24bff3570, type: 3} + - target: {fileID: 11400000, guid: 0e6bcf37a2876432fa58eff8888bf177, type: 2} + propertyPath: hoverCursor + value: + objectReference: {fileID: 2800000, guid: 22eb050bacf8c401ca8503e24bff3570, type: 3} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 0e6bcf37a2876432fa58eff8888bf177, type: 2} m_IsPrefabParent: 0 @@ -435,6 +452,9 @@ GameObject: - 114: {fileID: 2019116694} - 114: {fileID: 2019116696} - 114: {fileID: 2019116695} + - 114: {fileID: 2019116698} + - 114: {fileID: 2019116697} + - 114: {fileID: 2019116699} m_Layer: 0 m_Name: Flowchart m_TagString: Untagged @@ -453,6 +473,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} m_Name: m_EditorClassIdentifier: + version: 1.0 scrollPos: {x: 226, y: 86} variablesScrollPos: {x: 0, y: 0} variablesExpanded: 1 @@ -461,11 +482,12 @@ MonoBehaviour: scrollViewRect: serializedVersion: 2 x: -591 - y: -392 + y: -452 width: 1887 - height: 1020 - selectedBlock: {fileID: 2019116694} - selectedCommands: [] + height: 1080 + selectedBlock: {fileID: 2019116698} + selectedCommands: + - {fileID: 2019116697} variables: [] description: 'This scene shows how to set up a drag-and-drop @@ -999,6 +1021,57 @@ MonoBehaviour: m_EditorClassIdentifier: parentBlock: {fileID: 2019116694} clickableObject: {fileID: 591590529} +--- !u!114 &2019116697 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2019116667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb6f88496f37c444a91acef47749f723, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 21 + errorMessage: + indentLevel: 0 + cursorTexture: {fileID: 2800000, guid: 502e0c9b755f34db0b90bf78857d8a1c, type: 3} + hotSpot: {x: 0, y: 0} +--- !u!114 &2019116698 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2019116667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: -143 + y: -50 + width: 120 + height: 40 + itemId: 20 + blockName: Start + description: + eventHandler: {fileID: 2019116699} + commandList: + - {fileID: 2019116697} +--- !u!114 &2019116699 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2019116667} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 2019116698} --- !u!1001 &2135880372 Prefab: m_ObjectHideFlags: 0 @@ -1038,6 +1111,10 @@ Prefab: propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 4d55f86cf3b124c8fb1158da26ffa96d, type: 2} + propertyPath: hoverCursor + value: + objectReference: {fileID: 2800000, guid: 22eb050bacf8c401ca8503e24bff3570, type: 3} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 4d55f86cf3b124c8fb1158da26ffa96d, type: 2} m_IsPrefabParent: 0