Stable version
This commit is contained in:
16
Assets/JMO Assets/Welcome Screen/CFXR.WelcomeScreen.asmdef
Normal file
16
Assets/JMO Assets/Welcome Screen/CFXR.WelcomeScreen.asmdef
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "CFXR.WelcomeScreen",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 224eabc8f2d7cc54a8648d26f1a1b5f2
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
75
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.cs
Normal file
75
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace CartoonFX
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
public class CFXR_WelcomeScreen : EditorWindow
|
||||
{
|
||||
static CFXR_WelcomeScreen()
|
||||
{
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
if (SessionState.GetBool("CFXR_WelcomeScreen_Shown", false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
SessionState.SetBool("CFXR_WelcomeScreen_Shown", true);
|
||||
|
||||
var importer = AssetImporter.GetAtPath(AssetDatabase.GUIDToAssetPath("bfd03f272fe010b4ba558a3bc456ffeb"));
|
||||
if (importer != null && importer.userData == "dontshow")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Open();
|
||||
};
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Cartoon FX Remaster FREE - Welcome Screen")]
|
||||
static void Open()
|
||||
{
|
||||
var window = GetWindow<CFXR_WelcomeScreen>(true, "Cartoon FX Remaster FREE", true);
|
||||
window.minSize = new Vector2(516, 370);
|
||||
window.maxSize = new Vector2(516, 370);
|
||||
}
|
||||
|
||||
private void CreateGUI()
|
||||
{
|
||||
VisualElement root = rootVisualElement;
|
||||
root.style.height = new StyleLength(new Length(100, LengthUnit.Percent));
|
||||
|
||||
// UXML
|
||||
var uxmlDocument = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(AssetDatabase.GUIDToAssetPath("bfd03f272fe010b4ba558a3bc456ffeb"));
|
||||
root.Add(uxmlDocument.Instantiate());
|
||||
// USS
|
||||
var styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>(AssetDatabase.GUIDToAssetPath("f8b971f10a610844f968f582415df874"));
|
||||
root.styleSheets.Add(styleSheet);
|
||||
|
||||
// Background image
|
||||
root.style.backgroundImage = new StyleBackground(AssetDatabase.LoadAssetAtPath<Texture2D>(AssetDatabase.GUIDToAssetPath("fed1b64fd853f994c8d504720a0a6d44")));
|
||||
root.style.unityBackgroundScaleMode = ScaleMode.ScaleAndCrop;
|
||||
|
||||
// Logo image
|
||||
var titleImage = root.Q<Image>("img_title");
|
||||
titleImage.image = AssetDatabase.LoadAssetAtPath<Texture2D>(AssetDatabase.GUIDToAssetPath("a665b2e53088caa4c89dd09f9c889f62"));
|
||||
|
||||
// Buttons
|
||||
root.Q<Label>("btn_cfxr1").AddManipulator(new Clickable(evt => { Application.OpenURL("https://assetstore.unity.com/packages/slug/4010"); }));
|
||||
root.Q<Label>("btn_cfxr2").AddManipulator(new Clickable(evt => { Application.OpenURL("https://assetstore.unity.com/packages/slug/4274"); }));
|
||||
root.Q<Label>("btn_cfxr3").AddManipulator(new Clickable(evt => { Application.OpenURL("https://assetstore.unity.com/packages/slug/10172"); }));
|
||||
root.Q<Label>("btn_cfxr4").AddManipulator(new Clickable(evt => { Application.OpenURL("https://assetstore.unity.com/packages/slug/23634"); }));
|
||||
root.Q<Label>("btn_cfxrbundle").AddManipulator(new Clickable(evt => { Application.OpenURL("https://assetstore.unity.com/packages/slug/232385"); }));
|
||||
|
||||
root.Q<Button>("close_dontshow").RegisterCallback<ClickEvent>(evt =>
|
||||
{
|
||||
this.Close();
|
||||
var importer = AssetImporter.GetAtPath(AssetDatabase.GUIDToAssetPath("bfd03f272fe010b4ba558a3bc456ffeb"));
|
||||
importer.userData = "dontshow";
|
||||
importer.SaveAndReimport();
|
||||
});
|
||||
root.Q<Button>("close").RegisterCallback<ClickEvent>(evt => { this.Close(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.cs.meta
Normal file
11
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c4fcce295aee5d4fb38ac4f82c8e664
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
105
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.uss
Normal file
105
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.uss
Normal file
@@ -0,0 +1,105 @@
|
||||
:root
|
||||
{
|
||||
--color-cfxrf: rgba(64, 220, 160, 0.5);
|
||||
--color-cfxrf-link: rgba(64, 220, 160, 1.0);
|
||||
--color-cfxrf-link-hover: rgba(130, 240, 204, 1.0);
|
||||
}
|
||||
|
||||
VisualElement#main
|
||||
{
|
||||
padding: 10px;
|
||||
color: #D2D2D2;
|
||||
}
|
||||
|
||||
VisualElement#titlebox
|
||||
{
|
||||
padding: 10px;
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
|
||||
border-width: 2px;
|
||||
border-radius: 6px;
|
||||
border-color: var(--color-cfxrf);
|
||||
|
||||
border-bottom-width: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
Label#lbl_welcometo
|
||||
{
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 6px;
|
||||
font-size: 14px;
|
||||
-unity-font-style: bold;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
Image#img_title
|
||||
{
|
||||
height: 46px;
|
||||
width: 364px;
|
||||
top: 6px;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
VisualElement.roundedbox
|
||||
{
|
||||
padding: 8px;
|
||||
|
||||
border-width: 2px;
|
||||
border-radius: 6px;
|
||||
border-color: var(--color-cfxrf);
|
||||
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
Label#lbl_title
|
||||
{
|
||||
font-size: 28px;
|
||||
-unity-font-style: bold;
|
||||
color: #42daa3;
|
||||
}
|
||||
|
||||
TextElement
|
||||
{
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
Label.hyperlink
|
||||
{
|
||||
color: var(--color-cfxrf-link);
|
||||
font-size: 14px;
|
||||
-unity-text-align: middle-left;
|
||||
cursor: link;
|
||||
}
|
||||
Label.hyperlink:hover
|
||||
{
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
color: var(--color-cfxrf-link-hover);
|
||||
}
|
||||
Label.hyperlink:active
|
||||
{
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
background-color: #444;
|
||||
border-color: #333;
|
||||
color: #CCC;
|
||||
cursor: link;
|
||||
}
|
||||
Button:hover
|
||||
{
|
||||
background-color: #555;
|
||||
border-color: #444;
|
||||
}
|
||||
Button:active
|
||||
{
|
||||
background-color: #333;
|
||||
border-color: #222;
|
||||
color: #AAA;
|
||||
}
|
||||
11
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.uss.meta
Normal file
11
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.uss.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8b971f10a610844f968f582415df874
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
|
||||
disableValidation: 0
|
||||
39
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.uxml
Normal file
39
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen.uxml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<engine:UXML
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:engine="UnityEngine.UIElements"
|
||||
xmlns:editor="UnityEditor.UIElements"
|
||||
xsi:noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd"
|
||||
>
|
||||
<engine:VisualElement name="main">
|
||||
|
||||
<engine:VisualElement name="titlebox">
|
||||
<engine:Label name="lbl_welcometo" text="Welcome to" />
|
||||
<engine:Image name="img_title" />
|
||||
</engine:VisualElement>
|
||||
|
||||
<engine:VisualElement class="roundedbox">
|
||||
<engine:TextElement text="Cartoon FX Remaster FREE contains sample effects taken from the commercial Cartoon FX Remaster 1,2,3,4 packs!" />
|
||||
<engine:TextElement text="Feel free to use them for your projects, and please buy any or all of the commercial packs if you want more!" />
|
||||
<engine:VisualElement style="height: 10px;" />
|
||||
<engine:TextElement text="Effects are taken from:" />
|
||||
<engine:Label name="btn_cfxr1" class="hyperlink" text="• Cartoon FX Remaster 1" />
|
||||
<engine:Label name="btn_cfxr2" class="hyperlink" text="• Cartoon FX Remaster 2" />
|
||||
<engine:Label name="btn_cfxr3" class="hyperlink" text="• Cartoon FX Remaster 3" />
|
||||
<engine:Label name="btn_cfxr4" class="hyperlink" text="• Cartoon FX Remaster 4" />
|
||||
<engine:VisualElement style="height: 10px;" />
|
||||
<engine:TextElement text="You can also buy all effects at once at" />
|
||||
<engine:TextElement text="a reduced price through the" />
|
||||
<engine:Label name="btn_cfxrbundle" class="hyperlink" text="• Cartoon FX Remaster Bundle" />
|
||||
<engine:VisualElement style="height: 10px;" />
|
||||
|
||||
<engine:VisualElement style="display:flex; flex-direction: row;">
|
||||
<engine:TextElement text="Thank you! :)" />
|
||||
<engine:VisualElement name="spacer" style="flex-grow: 1;" />
|
||||
<engine:Button name="close_dontshow" text="Close and don't show again" />
|
||||
<engine:Button name="close" text="Close" />
|
||||
</engine:VisualElement>
|
||||
|
||||
</engine:VisualElement>
|
||||
</engine:VisualElement>
|
||||
</engine:UXML>
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfd03f272fe010b4ba558a3bc456ffeb
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData: dontshow
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
BIN
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen_Background.png
LFS
Normal file
BIN
Assets/JMO Assets/Welcome Screen/CFXR_WelcomeScreen_Background.png
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,108 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fed1b64fd853f994c8d504720a0a6d44
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
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
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 0
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user