Skip to content
Snippets Groups Projects
Commit bc95aaaf authored by Richard Marcus's avatar Richard Marcus
Browse files

removed radial menu for now

parent 88d22ddb
No related branches found
No related tags found
No related merge requests found
Showing
with 58 additions and 6220 deletions
fileFormatVersion: 2
guid: 7ed52491f6729f94cb45e3d59765be8d
folderAsset: yes
timeCreated: 1498701092
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: e4772b127aee05d4bbecc4509ad49cd0
timeCreated: 1492976662
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;
public class Test : MonoBehaviour
{
/*
[SerializeField]
PiUIManager piUi;
private bool menuOpened;
private PiUI normalMenu;
// Use this for initialization
void Start()
{
//Get menu for easy not repetitive getting of the menu when setting joystick input
normalMenu = piUi.GetPiUIOf("Normal Menu");
}
// Update is called once per frame
void Update()
{
//Bool function that returns true if on a menu
if (piUi.OverAMenu( ))
Debug.Log("You are over a menu");
else
Debug.Log("You are not over a menu");
//Just open the normal Menu if A is pressed
if (Input.GetKeyDown(KeyCode.A))
{
piUi.ChangeMenuState("Normal Menu", new Vector2(Screen.width / 2f, Screen.height / 2f));
}
//Update the menu and add the Testfunction to the button action if s or Fire1 axis is pressed
if (Input.GetKeyDown(KeyCode.S) || Input.GetButtonDown("Fire1"))
{
//Ensure menu isnt currently open on update just for a cleaner look
if (!piUi.PiOpened("Normal Menu"))
{
int i = 0;
//Iterate through the piData on normal menu
foreach (PiUI.PiData data in normalMenu.piData)
{
//Changes slice label
data.sliceLabel = "Test" + i.ToString( );
//Creates a new unity event and adds the testfunction to it
data.onSlicePressed = new UnityEngine.Events.UnityEvent( );
data.onSlicePressed.AddListener(TestFunction);
i++;
}
//Since PiUI.sliceCount or PiUI.equalSlices didnt change just calling update
piUi.UpdatePiMenu("Normal Menu");
}
//Open or close the menu depending on it's current state at the center of the screne
piUi.ChangeMenuState("Normal Menu", new Vector2(Screen.width / 2f, Screen.height / 2f));
}
if (Input.GetKeyDown(KeyCode.D))
{
//Ensure menu isnt currently open on regenerate so it doesnt spasm
if (!piUi.PiOpened("Normal Menu"))
{
//Make all angles equal
normalMenu.equalSlices = true;
normalMenu.iconDistance = 0f;
//Changes the piDataLength and adds new piData
normalMenu.piData = new PiUI.PiData[10];
for(int j = 0; j < 10; j++)
{
normalMenu.piData[j] = new PiUI.PiData( );
}
//Turns of the syncing of colors
normalMenu.syncColors = false;
//Changes open/Close animations
normalMenu.openTransition = PiUI.TransitionType.Fan;
normalMenu.closeTransition = PiUI.TransitionType.SlideRight;
int i = 0;
foreach (PiUI.PiData data in normalMenu.piData)
{
//Turning off the interactability of a slice
if(i % 2 ==0)
{
data.isInteractable = false;
}
//Set new highlight/non highlight colors
data.nonHighlightedColor = new Color(1 - i/10f, 0, 0, 1);
data.highlightedColor = new Color(0, 0, 1 - i/10f, 1);
data.disabledColor = Color.grey;
//Changes slice label
data.sliceLabel = "Test" + i.ToString( );
//Creates a new unity event and adds the testfunction to it
data.onSlicePressed = new UnityEngine.Events.UnityEvent( );
data.onSlicePressed.AddListener(TestFunction);
i += 1;
//Enables hoverFunctions
data.hoverFunctions = true;
//Creates a new unity event to adds on hovers function
data.onHoverEnter = new UnityEngine.Events.UnityEvent( );
data.onHoverEnter.AddListener(OnHoverEnter);
data.onHoverExit = new UnityEngine.Events.UnityEvent( );
data.onHoverExit.AddListener(OnHoverExit);
}
piUi.RegeneratePiMenu("Normal Menu");
}
piUi.ChangeMenuState("Normal Menu", new Vector2(Screen.width / 2f, Screen.height / 2f));
}
//Set joystick input on the normal menu which the piPieces check
normalMenu.joystickInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
//Set the bool to detect if the controller button has been pressed
normalMenu.joystickButton = Input.GetButtonDown("Fire1");
//If the button isnt pressed check if has been released
if (!normalMenu.joystickButton)
{
normalMenu.joystickButton = Input.GetButtonUp("Fire1");
}
}
//Test function that writes to the console and also closes the menu
public void TestFunction()
{
//Closes the menu
piUi.ChangeMenuState("Normal Menu");
Debug.Log("You Clicked me!");
}
public void OnHoverEnter()
{
Debug.Log("Hey get off of me!");
}
public void OnHoverExit()
{
Debug.Log("That's right and dont come back!");
}*/
}
fileFormatVersion: 2
guid: e4eeac98074d65f44baf4d22f245dfba
timeCreated: 1497550934
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;
public class TestWorld : MonoBehaviour
{
[SerializeField]
PiUIManager piUi;
private bool menuOpened;
private PiUI normalMenu;
// Use this for initialization
void Start()
{
//Get menu for easy not repetitive getting of the menu when setting joystick input
normalMenu = piUi.GetPiUIOf("Normal Menu");
}
// Update is called once per frame
void Update()
{
//Bool function that returns true if on a menu
if (piUi.OverAMenu( ))
Debug.Log("You are over a menu");
else
Debug.Log("You are not over a menu");
//Just open the normal Menu if A is pressed
if (Input.GetKeyDown(KeyCode.A))
{
Vector3 temp = Camera.main.ScreenToWorldPoint(Input.mousePosition);
temp.z = 0;
piUi.ChangeMenuState("Normal Menu",temp);
}
//Update the menu and add the Testfunction to the button action if s or Fire1 axis is pressed
if (Input.GetKeyDown(KeyCode.S) || Input.GetButtonDown("Fire1"))
{
//Ensure menu isnt currently open on update just for a cleaner look
if (!piUi.PiOpened("Normal Menu"))
{
int i = 0;
//Iterate through the piData on normal menu
foreach (PiUI.PiData data in normalMenu.piData)
{
//Changes slice label
data.sliceLabel = "Test" + i.ToString( );
//Creates a new unity event and adds the testfunction to it
// data.onSlicePressed = new UnityEngine.Events.UnityEvent( );
// data.onSlicePressed.AddListener(TestFunction);
i++;
}
//Since PiUI.sliceCount or PiUI.equalSlices didnt change just calling update
piUi.UpdatePiMenu("Normal Menu");
}
//Open or close the menu depending on it's current state at the center of the screne
piUi.ChangeMenuState("Normal Menu", new Vector2(Screen.width / 2f, Screen.height / 2f));
}
if (Input.GetKeyDown(KeyCode.D))
{
//Ensure menu isnt currently open on regenerate so it doesnt spasm
if (!piUi.PiOpened("Normal Menu"))
{
//Make all angles equal
normalMenu.equalSlices = true;
normalMenu.iconDistance = 0f;
//Changes the piDataLength and adds new piData
normalMenu.piData = new PiUI.PiData[10];
for(int j = 0; j < 10; j++)
{
normalMenu.piData[j] = new PiUI.PiData( );
}
//Turns of the syncing of colors
normalMenu.syncColors = false;
//Changes open/Close animations
normalMenu.openTransition = PiUI.TransitionType.Fan;
normalMenu.closeTransition = PiUI.TransitionType.SlideRight;
int i = 0;
foreach (PiUI.PiData data in normalMenu.piData)
{
//Turning off the interactability of a slice
if(i % 2 ==0)
{
data.isInteractable = false;
}
//Set new highlight/non highlight colors
data.nonHighlightedColor = new Color(1 - i/10f, 0, 0, 1);
data.highlightedColor = new Color(0, 0, 1 - i/10f, 1);
data.disabledColor = Color.grey;
//Changes slice label
data.sliceLabel = "Test" + i.ToString( );
//Creates a new unity event and adds the testfunction to it
// data.onSlicePressed = new UnityEngine.Events.UnityEvent( );
// data.onSlicePressed.AddListener(TestFunction);
i += 1;
//Enables hoverFunctions
data.hoverFunctions = true;
//Creates a new unity event to adds on hovers function
data.onHoverEnter = new UnityEngine.Events.UnityEvent( );
data.onHoverEnter.AddListener(OnHoverEnter);
data.onHoverExit = new UnityEngine.Events.UnityEvent( );
data.onHoverExit.AddListener(OnHoverExit);
}
piUi.RegeneratePiMenu("Normal Menu");
}
piUi.ChangeMenuState("Normal Menu", new Vector2(Screen.width / 2f, Screen.height / 2f));
}
//Set joystick input on the normal menu which the piPieces check
normalMenu.joystickInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
//Set the bool to detect if the controller button has been pressed
normalMenu.joystickButton = Input.GetButtonDown("Fire1");
//If the button isnt pressed check if has been released
if (Input.GetButtonUp("Fire1"))
{
normalMenu.joystickButton = Input.GetButtonUp("Fire1");
normalMenu.CloseMenu();
}
}
//Test function that writes to the console and also closes the menu
public void TestFunction()
{
//Closes the menu
piUi.ChangeMenuState("Normal Menu");
Debug.Log("You Clicked me!");
}
public void OnHoverEnter()
{
Debug.Log("Hey get off of me!");
}
public void OnHoverExit()
{
Debug.Log("That's right and dont come back!");
}
}
fileFormatVersion: 2
guid: a3940b2159cc54a4aa36b0177174a0da
timeCreated: 1497550934
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2b2cf75c3ee2f514094ade2274c0a6ca
folderAsset: yes
timeCreated: 1501016739
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Assets/PiUi/Tools/Hammer.png

129 B

fileFormatVersion: 2
guid: f3a0ea9f0ad34184faa45ad4b37d3019
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 242bfe502257a1c49acd91b831152dc6
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/PiUi/Tools/Saw.png

130 B

fileFormatVersion: 2
guid: 9b3b8b9ebb1a7a6469f34c8a939829ae
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 8b30aacaa7d40864b8148096fb694dfd
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/PiUi/Tools/ScrewDriver.png

130 B

fileFormatVersion: 2
guid: 8267cc0dfa9947e4fa363078fb00a7e2
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 1daa3ef050994e84b80393d4e3a4ef42
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/PiUi/Tools/Wrench.png

130 B

fileFormatVersion: 2
guid: ca34d7eb0cdd548478e4eb6ad3775901
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 0d78b85cdaa51924e93970d3330cb2a9
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment