Browse Source

Merge pull request #561 from zvinless/icons

Pro skin icons and editor resources restructure
master
Chris Gregan 9 years ago committed by GitHub
parent
commit
e49c395a1c
  1. 9
      Assets/Fungus/EditorResources.meta
  2. 0
      Assets/Fungus/EditorResources/Icons.meta
  3. 9
      Assets/Fungus/EditorResources/Icons/Pro.meta
  4. BIN
      Assets/Fungus/EditorResources/Icons/Pro/add.png
  5. 16
      Assets/Fungus/EditorResources/Icons/Pro/add.png.meta
  6. BIN
      Assets/Fungus/EditorResources/Icons/Pro/add_small.png
  7. 16
      Assets/Fungus/EditorResources/Icons/Pro/add_small.png.meta
  8. BIN
      Assets/Fungus/EditorResources/Icons/Pro/delete.png
  9. 16
      Assets/Fungus/EditorResources/Icons/Pro/delete.png.meta
  10. BIN
      Assets/Fungus/EditorResources/Icons/Pro/down.png
  11. 59
      Assets/Fungus/EditorResources/Icons/Pro/down.png.meta
  12. BIN
      Assets/Fungus/EditorResources/Icons/Pro/duplicate.png
  13. 59
      Assets/Fungus/EditorResources/Icons/Pro/duplicate.png.meta
  14. BIN
      Assets/Fungus/EditorResources/Icons/Pro/up.png
  15. 59
      Assets/Fungus/EditorResources/Icons/Pro/up.png.meta
  16. 0
      Assets/Fungus/EditorResources/Icons/add.png
  17. 0
      Assets/Fungus/EditorResources/Icons/add.png.meta
  18. 0
      Assets/Fungus/EditorResources/Icons/add_small.png
  19. 0
      Assets/Fungus/EditorResources/Icons/add_small.png.meta
  20. 0
      Assets/Fungus/EditorResources/Icons/delete.png
  21. 0
      Assets/Fungus/EditorResources/Icons/delete.png.meta
  22. 0
      Assets/Fungus/EditorResources/Icons/down.png
  23. 0
      Assets/Fungus/EditorResources/Icons/down.png.meta
  24. 0
      Assets/Fungus/EditorResources/Icons/duplicate.png
  25. 0
      Assets/Fungus/EditorResources/Icons/duplicate.png.meta
  26. 0
      Assets/Fungus/EditorResources/Icons/up.png
  27. 0
      Assets/Fungus/EditorResources/Icons/up.png.meta
  28. 0
      Assets/Fungus/EditorResources/Textures.meta
  29. 0
      Assets/Fungus/EditorResources/Textures/choice_node_off.png
  30. 0
      Assets/Fungus/EditorResources/Textures/choice_node_off.png.meta
  31. 0
      Assets/Fungus/EditorResources/Textures/choice_node_on.png
  32. 0
      Assets/Fungus/EditorResources/Textures/choice_node_on.png.meta
  33. 0
      Assets/Fungus/EditorResources/Textures/command_background.png
  34. 0
      Assets/Fungus/EditorResources/Textures/command_background.png.meta
  35. 0
      Assets/Fungus/EditorResources/Textures/event_node_off.png
  36. 0
      Assets/Fungus/EditorResources/Textures/event_node_off.png.meta
  37. 0
      Assets/Fungus/EditorResources/Textures/event_node_on.png
  38. 0
      Assets/Fungus/EditorResources/Textures/event_node_on.png.meta
  39. 0
      Assets/Fungus/EditorResources/Textures/play_big.png
  40. 0
      Assets/Fungus/EditorResources/Textures/play_big.png.meta
  41. 0
      Assets/Fungus/EditorResources/Textures/play_small.png
  42. 0
      Assets/Fungus/EditorResources/Textures/play_small.png.meta
  43. 0
      Assets/Fungus/EditorResources/Textures/process_node_off.png
  44. 0
      Assets/Fungus/EditorResources/Textures/process_node_off.png.meta
  45. 0
      Assets/Fungus/EditorResources/Textures/process_node_on.png
  46. 0
      Assets/Fungus/EditorResources/Textures/process_node_on.png.meta
  47. BIN
      Assets/Fungus/Resources/Icons/ResizeHandle.png
  48. BIN
      Assets/Fungus/Resources/Icons/left.png
  49. BIN
      Assets/Fungus/Resources/Icons/right.png
  50. 10
      Assets/Fungus/Scripts/Editor/BlockEditor.cs
  51. 4
      Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs
  52. 2
      Assets/Fungus/Scripts/Editor/FlowchartEditor.cs
  53. 16
      Assets/Fungus/Scripts/Editor/FlowchartWindow.cs
  54. 200
      Assets/Fungus/Scripts/Editor/FungusEditorResources.cs
  55. 44
      Assets/Fungus/Scripts/Editor/FungusEditorResourcesGenerated.cs
  56. 12
      Assets/Fungus/Scripts/Editor/FungusEditorResourcesGenerated.cs.meta

9
Assets/Fungus/EditorResources.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5ff164265158945c18b7d438b570ba22
folderAsset: yes
timeCreated: 1478502248
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

0
Assets/Fungus/Resources/Icons.meta → Assets/Fungus/EditorResources/Icons.meta

9
Assets/Fungus/EditorResources/Icons/Pro.meta

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5e5a1319ef7f546a7affe3baabd5fba6
folderAsset: yes
timeCreated: 1478502692
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fungus/EditorResources/Icons/Pro/add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

16
Assets/Fungus/Resources/Icons/right.png.meta → Assets/Fungus/EditorResources/Icons/Pro/add.png.meta

@ -1,5 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b3dd8b25a62664f379cb3714060d4e33 guid: 4e43c476b4a7a49a08c37378fb01ce99
timeCreated: 1478502692
licenseType: Free
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
serializedVersion: 2 serializedVersion: 2
@ -15,17 +17,17 @@ TextureImporter:
bumpmap: bumpmap:
convertToNormalMap: 0 convertToNormalMap: 0
externalNormalMap: 0 externalNormalMap: 0
heightScale: .25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
isReadable: 0 isReadable: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 0 generateCubemap: 0
cubemapConvolution: 0 cubemapConvolution: 0
cubemapConvolutionSteps: 8 cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5 cubemapConvolutionExponent: 1.5
seamlessCubemap: 0 seamlessCubemap: 0
textureFormat: -3 textureFormat: -3
maxTextureSize: 1024 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: 1 aniso: 1
@ -35,18 +37,22 @@ TextureImporter:
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0 spriteMode: 0
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 1 alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2 textureType: 2
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
serializedVersion: 2
sprites: [] sprites: []
outline: []
spritePackingTag: spritePackingTag:
userData: userData:
assetBundleName: assetBundleName:

BIN
Assets/Fungus/EditorResources/Icons/Pro/add_small.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

16
Assets/Fungus/Resources/Icons/ResizeHandle.png.meta → Assets/Fungus/EditorResources/Icons/Pro/add_small.png.meta

@ -1,5 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c8b63a574d777374a918f2900930e540 guid: 64534dfaa17844231a9a9dd2df89d0db
timeCreated: 1478502692
licenseType: Free
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
serializedVersion: 2 serializedVersion: 2
@ -15,17 +17,17 @@ TextureImporter:
bumpmap: bumpmap:
convertToNormalMap: 0 convertToNormalMap: 0
externalNormalMap: 0 externalNormalMap: 0
heightScale: .25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
isReadable: 0 isReadable: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 0 generateCubemap: 0
cubemapConvolution: 0 cubemapConvolution: 0
cubemapConvolutionSteps: 8 cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5 cubemapConvolutionExponent: 1.5
seamlessCubemap: 0 seamlessCubemap: 0
textureFormat: -3 textureFormat: -3
maxTextureSize: 1024 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: 1 aniso: 1
@ -35,18 +37,22 @@ TextureImporter:
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0 spriteMode: 0
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 1 alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2 textureType: 2
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
serializedVersion: 2
sprites: [] sprites: []
outline: []
spritePackingTag: spritePackingTag:
userData: userData:
assetBundleName: assetBundleName:

BIN
Assets/Fungus/EditorResources/Icons/Pro/delete.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

16
Assets/Fungus/Resources/Icons/left.png.meta → Assets/Fungus/EditorResources/Icons/Pro/delete.png.meta

@ -1,5 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c0a7a4711d69249ab9dae1539a3247ee guid: 29c4d29b1678042a5b3516c732ccc507
timeCreated: 1478502692
licenseType: Free
TextureImporter: TextureImporter:
fileIDToRecycleName: {} fileIDToRecycleName: {}
serializedVersion: 2 serializedVersion: 2
@ -15,17 +17,17 @@ TextureImporter:
bumpmap: bumpmap:
convertToNormalMap: 0 convertToNormalMap: 0
externalNormalMap: 0 externalNormalMap: 0
heightScale: .25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
isReadable: 0 isReadable: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 0 generateCubemap: 0
cubemapConvolution: 0 cubemapConvolution: 0
cubemapConvolutionSteps: 8 cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5 cubemapConvolutionExponent: 1.5
seamlessCubemap: 0 seamlessCubemap: 0
textureFormat: -3 textureFormat: -3
maxTextureSize: 1024 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: 1 aniso: 1
@ -35,18 +37,22 @@ TextureImporter:
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0 spriteMode: 0
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 1 alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2 textureType: 2
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
serializedVersion: 2
sprites: [] sprites: []
outline: []
spritePackingTag: spritePackingTag:
userData: userData:
assetBundleName: assetBundleName:

BIN
Assets/Fungus/EditorResources/Icons/Pro/down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

59
Assets/Fungus/EditorResources/Icons/Pro/down.png.meta

@ -0,0 +1,59 @@
fileFormatVersion: 2
guid: 5a87a7d3683164a238377d948572805f
timeCreated: 1478502692
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fungus/EditorResources/Icons/Pro/duplicate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

59
Assets/Fungus/EditorResources/Icons/Pro/duplicate.png.meta

@ -0,0 +1,59 @@
fileFormatVersion: 2
guid: 2f17490d993c84bd7872ef6588ffba47
timeCreated: 1478502692
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Fungus/EditorResources/Icons/Pro/up.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

59
Assets/Fungus/EditorResources/Icons/Pro/up.png.meta

@ -0,0 +1,59 @@
fileFormatVersion: 2
guid: 2a76a781db2994b33b83cd84b8835da7
timeCreated: 1478502692
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

0
Assets/Fungus/Resources/Icons/add.png → Assets/Fungus/EditorResources/Icons/add.png

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

0
Assets/Fungus/Resources/Icons/add.png.meta → Assets/Fungus/EditorResources/Icons/add.png.meta

0
Assets/Fungus/Resources/Icons/add_small.png → Assets/Fungus/EditorResources/Icons/add_small.png

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

0
Assets/Fungus/Resources/Icons/add_small.png.meta → Assets/Fungus/EditorResources/Icons/add_small.png.meta

0
Assets/Fungus/Resources/Icons/delete.png → Assets/Fungus/EditorResources/Icons/delete.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Icons/delete.png.meta → Assets/Fungus/EditorResources/Icons/delete.png.meta

0
Assets/Fungus/Resources/Icons/down.png → Assets/Fungus/EditorResources/Icons/down.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Icons/down.png.meta → Assets/Fungus/EditorResources/Icons/down.png.meta

0
Assets/Fungus/Resources/Icons/duplicate.png → Assets/Fungus/EditorResources/Icons/duplicate.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Icons/duplicate.png.meta → Assets/Fungus/EditorResources/Icons/duplicate.png.meta

0
Assets/Fungus/Resources/Icons/up.png → Assets/Fungus/EditorResources/Icons/up.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Icons/up.png.meta → Assets/Fungus/EditorResources/Icons/up.png.meta

0
Assets/Fungus/Resources/Textures.meta → Assets/Fungus/EditorResources/Textures.meta

0
Assets/Fungus/Resources/Textures/choice_node_off.png → Assets/Fungus/EditorResources/Textures/choice_node_off.png

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
Assets/Fungus/Resources/Textures/choice_node_off.png.meta → Assets/Fungus/EditorResources/Textures/choice_node_off.png.meta

0
Assets/Fungus/Resources/Textures/choice_node_on.png → Assets/Fungus/EditorResources/Textures/choice_node_on.png

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
Assets/Fungus/Resources/Textures/choice_node_on.png.meta → Assets/Fungus/EditorResources/Textures/choice_node_on.png.meta

0
Assets/Fungus/Resources/Textures/command_background.png → Assets/Fungus/EditorResources/Textures/command_background.png

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

0
Assets/Fungus/Resources/Textures/command_background.png.meta → Assets/Fungus/EditorResources/Textures/command_background.png.meta

0
Assets/Fungus/Resources/Textures/event_node_off.png → Assets/Fungus/EditorResources/Textures/event_node_off.png

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
Assets/Fungus/Resources/Textures/event_node_off.png.meta → Assets/Fungus/EditorResources/Textures/event_node_off.png.meta

0
Assets/Fungus/Resources/Textures/event_node_on.png → Assets/Fungus/EditorResources/Textures/event_node_on.png

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
Assets/Fungus/Resources/Textures/event_node_on.png.meta → Assets/Fungus/EditorResources/Textures/event_node_on.png.meta

0
Assets/Fungus/Resources/Textures/play_big.png → Assets/Fungus/EditorResources/Textures/play_big.png

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

0
Assets/Fungus/Resources/Textures/play_big.png.meta → Assets/Fungus/EditorResources/Textures/play_big.png.meta

0
Assets/Fungus/Resources/Textures/play_small.png → Assets/Fungus/EditorResources/Textures/play_small.png

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

0
Assets/Fungus/Resources/Textures/play_small.png.meta → Assets/Fungus/EditorResources/Textures/play_small.png.meta

0
Assets/Fungus/Resources/Textures/process_node_off.png → Assets/Fungus/EditorResources/Textures/process_node_off.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Assets/Fungus/Resources/Textures/process_node_off.png.meta → Assets/Fungus/EditorResources/Textures/process_node_off.png.meta

0
Assets/Fungus/Resources/Textures/process_node_on.png → Assets/Fungus/EditorResources/Textures/process_node_on.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
Assets/Fungus/Resources/Textures/process_node_on.png.meta → Assets/Fungus/EditorResources/Textures/process_node_on.png.meta

BIN
Assets/Fungus/Resources/Icons/ResizeHandle.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

BIN
Assets/Fungus/Resources/Icons/left.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
Assets/Fungus/Resources/Icons/right.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

10
Assets/Fungus/Scripts/Editor/BlockEditor.cs

@ -41,11 +41,11 @@ namespace Fungus.EditorUtils
protected virtual void OnEnable() protected virtual void OnEnable()
{ {
upIcon = Resources.Load("Icons/up") as Texture2D; upIcon = FungusEditorResources.Up;
downIcon = Resources.Load("Icons/down") as Texture2D; downIcon = FungusEditorResources.Down;
addIcon = Resources.Load("Icons/add") as Texture2D; addIcon = FungusEditorResources.Add;
duplicateIcon = Resources.Load("Icons/duplicate") as Texture2D; duplicateIcon = FungusEditorResources.Duplicate;
deleteIcon = Resources.Load("Icons/delete") as Texture2D; deleteIcon = FungusEditorResources.Delete;
} }
public virtual void DrawBlockName(Flowchart flowchart) public virtual void DrawBlockName(Flowchart flowchart)

4
Assets/Fungus/Scripts/Editor/CommandListAdaptor.cs

@ -213,7 +213,7 @@ namespace Fungus.EditorUtils
string commandName = commandInfoAttr.CommandName; string commandName = commandInfoAttr.CommandName;
GUIStyle commandLabelStyle = new GUIStyle(GUI.skin.box); GUIStyle commandLabelStyle = new GUIStyle(GUI.skin.box);
commandLabelStyle.normal.background = FungusEditorResources.texCommandBackground; commandLabelStyle.normal.background = FungusEditorResources.CommandBackground;
int borderSize = 5; int borderSize = 5;
commandLabelStyle.border.top = borderSize; commandLabelStyle.border.top = borderSize;
commandLabelStyle.border.bottom = borderSize; commandLabelStyle.border.bottom = borderSize;
@ -420,7 +420,7 @@ namespace Fungus.EditorUtils
alpha = Mathf.Clamp01(alpha); alpha = Mathf.Clamp01(alpha);
GUI.color = new Color(1f, 1f, 1f, alpha); GUI.color = new Color(1f, 1f, 1f, alpha);
GUI.Label(iconRect, FungusEditorResources.texPlaySmall, new GUIStyle()); GUI.Label(iconRect, FungusEditorResources.PlaySmall, new GUIStyle());
GUI.color = storeColor; GUI.color = storeColor;
} }

2
Assets/Fungus/Scripts/Editor/FlowchartEditor.cs

@ -50,7 +50,7 @@ namespace Fungus.EditorUtils
luaEnvironmentProp = serializedObject.FindProperty("luaEnvironment"); luaEnvironmentProp = serializedObject.FindProperty("luaEnvironment");
luaBindingNameProp = serializedObject.FindProperty("luaBindingName"); luaBindingNameProp = serializedObject.FindProperty("luaBindingName");
addTexture = Resources.Load("Icons/add_small") as Texture2D; addTexture = FungusEditorResources.AddSmall;
} }
public override void OnInspectorGUI() public override void OnInspectorGUI()

16
Assets/Fungus/Scripts/Editor/FlowchartWindow.cs

@ -65,7 +65,7 @@ namespace Fungus.EditorUtils
nodeStyle.alignment = TextAnchor.MiddleCenter; nodeStyle.alignment = TextAnchor.MiddleCenter;
nodeStyle.wordWrap = true; nodeStyle.wordWrap = true;
addTexture = Resources.Load("Icons/add_small") as Texture2D; addTexture = FungusEditorResources.AddSmall;
} }
protected virtual void OnInspectorUpdate() protected virtual void OnInspectorUpdate()
@ -473,7 +473,7 @@ namespace Fungus.EditorUtils
GUI.color = new Color(1f, 1f, 1f, alpha); GUI.color = new Color(1f, 1f, 1f, alpha);
} }
if (GUI.Button(rect, FungusEditorResources.texPlayBig as Texture, new GUIStyle())) if (GUI.Button(rect, FungusEditorResources.PlayBig, new GUIStyle()))
{ {
SelectBlock(flowchart, b); SelectBlock(flowchart, b);
} }
@ -855,8 +855,8 @@ namespace Fungus.EditorUtils
if (block._EventHandler != null) if (block._EventHandler != null)
{ {
offTex = FungusEditorResources.texEventNodeOff; offTex = FungusEditorResources.EventNodeOff;
onTex = FungusEditorResources.texEventNodeOn; onTex = FungusEditorResources.EventNodeOn;
defaultColor = FungusConstants.DefaultEventBlockTint; defaultColor = FungusConstants.DefaultEventBlockTint;
} }
else else
@ -876,14 +876,14 @@ namespace Fungus.EditorUtils
if (uniqueList.Count > 1) if (uniqueList.Count > 1)
{ {
offTex = FungusEditorResources.texChoiceNodeOff; offTex = FungusEditorResources.ChoiceNodeOff;
onTex = FungusEditorResources.texChoiceNodeOn; onTex = FungusEditorResources.ChoiceNodeOn;
defaultColor = FungusConstants.DefaultChoiceBlockTint; defaultColor = FungusConstants.DefaultChoiceBlockTint;
} }
else else
{ {
offTex = FungusEditorResources.texProcessNodeOff; offTex = FungusEditorResources.ProcessNodeOff;
onTex = FungusEditorResources.texProcessNodeOn; onTex = FungusEditorResources.ProcessNodeOn;
defaultColor = FungusConstants.DefaultProcessBlockTint; defaultColor = FungusConstants.DefaultProcessBlockTint;
} }
} }

200
Assets/Fungus/Scripts/Editor/FungusEditorResources.cs

@ -1,149 +1,115 @@
// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). // This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) // It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
using System; using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
namespace Fungus.EditorUtils namespace Fungus.EditorUtils
{ {
internal static class FungusEditorResources internal static partial class FungusEditorResources
{ {
private static Dictionary<string, Texture2D> textures = new Dictionary<string, Texture2D>();
static FungusEditorResources() { private static readonly string editorResourcesFolderName = "\"EditorResources\"";
GenerateSpecialTextures();
LoadResourceAssets();
}
private enum ResourceName
{
command_background = 0,
choice_node_off,
choice_node_on,
process_node_off,
process_node_on,
event_node_off,
event_node_on,
play_big,
play_small
}
private static string[] s_LightSkin = { static FungusEditorResources()
"command_background",
"choice_node_off",
"choice_node_on",
"process_node_off",
"process_node_on",
"event_node_off",
"event_node_on",
"play_big",
"play_small"
};
private static string[] s_DarkSkin = {
"command_background",
"choice_node_off",
"choice_node_on",
"process_node_off",
"process_node_on",
"event_node_off",
"event_node_on",
"play_big",
"play_small"
};
public static Texture2D texCommandBackground
{ {
get { return s_Cached[(int)ResourceName.command_background]; } LoadTexturesFromNames();
} }
public static Texture2D texEventNodeOn private static void LoadTexturesFromNames()
{ {
get { return s_Cached[(int)ResourceName.event_node_on]; } var baseDirectories = AssetDatabase.FindAssets(editorResourcesFolderName).Select(
} guid => AssetDatabase.GUIDToAssetPath(guid)
).ToArray();
public static Texture2D texEventNodeOff
{ foreach (var name in resourceNames)
get { return s_Cached[(int)ResourceName.event_node_off]; } {
LoadTexturesFromGUIDs(AssetDatabase.FindAssets(name + " t:Texture2D", baseDirectories));
}
} }
public static Texture2D texProcessNodeOn private static void LoadAllTexturesInFolder()
{
get { return s_Cached[(int)ResourceName.process_node_on]; }
}
public static Texture2D texProcessNodeOff
{ {
get { return s_Cached[(int)ResourceName.process_node_off]; } var rootGuid = AssetDatabase.FindAssets(editorResourcesFolderName)[0];
var root = AssetDatabase.GUIDToAssetPath(rootGuid);
LoadTexturesFromGUIDs(AssetDatabase.FindAssets("t:Texture2D", new [] { root }));
} }
public static Texture2D texChoiceNodeOn private static void LoadTexturesFromGUIDs(string[] guids)
{ {
get { return s_Cached[(int)ResourceName.choice_node_on]; } var paths = guids.Select(guid => AssetDatabase.GUIDToAssetPath(guid)).OrderBy(path => path.ToLower().Contains("/pro/"));
}
foreach (var path in paths)
public static Texture2D texChoiceNodeOff {
{ if (path.ToLower().Contains("/pro/") && !EditorGUIUtility.isProSkin)
get { return s_Cached[(int)ResourceName.choice_node_off]; } {
return;
}
var texture = AssetDatabase.LoadAssetAtPath(path, typeof(Texture2D)) as Texture2D;
textures[texture.name] = texture;
}
} }
public static Texture2D texPlayBig [MenuItem("Tools/Fungus/Utilities/Update Editor Resources Script")]
private static void GenerateResourcesScript()
{ {
get { return s_Cached[(int)ResourceName.play_big]; } textures.Clear();
} LoadAllTexturesInFolder();
public static Texture2D texPlaySmall var guid = AssetDatabase.FindAssets("FungusEditorResources t:MonoScript")[0];
{ var relativePath = AssetDatabase.GUIDToAssetPath(guid).Replace("FungusEditorResources.cs", "FungusEditorResourcesGenerated.cs");
get { return s_Cached[(int)ResourceName.play_small]; } var absolutePath = Application.dataPath + relativePath.Substring("Assets".Length);
}
using (var writer = new StreamWriter(absolutePath))
{
writer.WriteLine("// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).");
writer.WriteLine("// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)");
writer.WriteLine("");
writer.WriteLine("using UnityEngine;");
writer.WriteLine("");
writer.WriteLine("namespace Fungus.EditorUtils");
writer.WriteLine("{");
writer.WriteLine(" internal static partial class FungusEditorResources");
writer.WriteLine(" {");
writer.WriteLine(" private static readonly string[] resourceNames = new [] {");
foreach (var pair in textures)
{
writer.WriteLine(" \"" + pair.Key + "\",");
}
public static Texture2D texItemSplitter { get; private set; } writer.WriteLine(" };");
writer.WriteLine("");
private static void GenerateSpecialTextures()
{ foreach (var pair in textures)
var splitterColor = EditorGUIUtility.isProSkin {
? new Color(1f, 1f, 1f, 0.14f) var name = pair.Key;
: new Color(0.59f, 0.59f, 0.59f, 0.55f) var pascalCase = string.Join("", name.Split(new [] { '_' }, StringSplitOptions.RemoveEmptyEntries).Select(
; s => s.Substring(0, 1).ToUpper() + s.Substring(1)).ToArray()
texItemSplitter = CreatePixelTexture("(Generated) Item Splitter", splitterColor); );
} writer.WriteLine(" public static Texture2D " + pascalCase + " { get { return GetTexture(\"" + name + "\"); } }");
}
public static Texture2D CreatePixelTexture(string name, Color color)
{ writer.WriteLine(" }");
var tex = new Texture2D(1, 1, TextureFormat.ARGB32, false, true); writer.WriteLine("}");
tex.name = name; }
tex.hideFlags = HideFlags.HideAndDontSave;
tex.filterMode = FilterMode.Point; AssetDatabase.ImportAsset(relativePath);
tex.SetPixel(0, 0, color);
tex.Apply();
return tex;
} }
private static Texture2D[] s_Cached; private static Texture2D GetTexture(string name)
public static void LoadResourceAssets()
{ {
var skin = EditorGUIUtility.isProSkin ? s_DarkSkin : s_LightSkin; Texture2D texture;
s_Cached = new Texture2D[skin.Length]; if (!textures.TryGetValue(name, out texture))
for (int i = 0; i < s_Cached.Length; ++i)
{ {
s_Cached[i] = Resources.Load("Textures/" + skin[i]) as Texture2D; Debug.LogWarning("Texture \"" + name + "\" not found!");
} }
s_LightSkin = null; return texture;
s_DarkSkin = null;
}
private static void GetImageSize(byte[] imageData, out int width, out int height)
{
width = ReadInt(imageData, 3 + 15);
height = ReadInt(imageData, 3 + 15 + 2 + 2);
}
private static int ReadInt(byte[] imageData, int offset)
{
return (imageData[offset] << 8) | imageData[offset + 1];
} }
} }
} }

44
Assets/Fungus/Scripts/Editor/FungusEditorResourcesGenerated.cs

@ -0,0 +1,44 @@
// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
namespace Fungus.EditorUtils
{
internal static partial class FungusEditorResources
{
private static readonly string[] resourceNames = new [] {
"add",
"add_small",
"delete",
"down",
"duplicate",
"up",
"choice_node_off",
"choice_node_on",
"command_background",
"event_node_off",
"event_node_on",
"play_big",
"play_small",
"process_node_off",
"process_node_on",
};
public static Texture2D Add { get { return GetTexture("add"); } }
public static Texture2D AddSmall { get { return GetTexture("add_small"); } }
public static Texture2D Delete { get { return GetTexture("delete"); } }
public static Texture2D Down { get { return GetTexture("down"); } }
public static Texture2D Duplicate { get { return GetTexture("duplicate"); } }
public static Texture2D Up { get { return GetTexture("up"); } }
public static Texture2D ChoiceNodeOff { get { return GetTexture("choice_node_off"); } }
public static Texture2D ChoiceNodeOn { get { return GetTexture("choice_node_on"); } }
public static Texture2D CommandBackground { get { return GetTexture("command_background"); } }
public static Texture2D EventNodeOff { get { return GetTexture("event_node_off"); } }
public static Texture2D EventNodeOn { get { return GetTexture("event_node_on"); } }
public static Texture2D PlayBig { get { return GetTexture("play_big"); } }
public static Texture2D PlaySmall { get { return GetTexture("play_small"); } }
public static Texture2D ProcessNodeOff { get { return GetTexture("process_node_off"); } }
public static Texture2D ProcessNodeOn { get { return GetTexture("process_node_on"); } }
}
}

12
Assets/Fungus/Scripts/Editor/FungusEditorResourcesGenerated.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f5119f9bdde234916bed657bdc751f76
timeCreated: 1478502142
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save