Skip to content
This repository was archived by the owner on Jan 9, 2022. It is now read-only.

Commit e7ddfa4

Browse files
authored
Merge pull request #16 from Juce-Assets/develop
New version
2 parents 0f474cf + 9d42d95 commit e7ddfa4

File tree

44 files changed

+1397
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1397
-141
lines changed

Editor/Documentation/Image/ImageFillAmmountDocumentation.cs renamed to Editor/Documentation/Image/ImageFillAmountDocumentation.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
namespace Juce.Feedbacks
66
{
7-
internal class ImageFillAmmountDocumentation : IFeedbackDocumentation
7+
internal class ImageFillAmountDocumentation : IFeedbackDocumentation
88
{
9-
public Type FeedbackType => typeof(ImageFillAmmountFeedback);
9+
public Type FeedbackType => typeof(ImageFillAmountFeedback);
1010

1111
public void DrawDocumentation()
1212
{
13-
GUILayout.Label("Changes the target Image fill ammount value", EditorStyles.wordWrappedLabel);
13+
GUILayout.Label("Changes the target Image fill amount value", EditorStyles.wordWrappedLabel);
1414

1515
EditorGUILayout.Space(2);
1616

@@ -21,9 +21,9 @@ public void DrawDocumentation()
2121

2222
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
2323
{
24-
GUILayout.Label("- Use Starting Value: enables the starting fill ammount", EditorStyles.wordWrappedLabel);
25-
GUILayout.Label("- Start: (if enabled) starting fill ammount value", EditorStyles.wordWrappedLabel);
26-
GUILayout.Label("- End: end fill ammount value to reach", EditorStyles.wordWrappedLabel);
24+
GUILayout.Label("- Use Starting Value: enables the starting fill amount", EditorStyles.wordWrappedLabel);
25+
GUILayout.Label("- Start: (if enabled) starting fill amount value", EditorStyles.wordWrappedLabel);
26+
GUILayout.Label("- End: end fill amount value to reach", EditorStyles.wordWrappedLabel);
2727
}
2828

2929
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))

Editor/Documentation/Light/LightShadowStrenghtDocumentation.cs renamed to Editor/Documentation/Light/LightShadowStrengthDocumentation.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
namespace Juce.Feedbacks
66
{
7-
internal class LightShadowStrenghtDocumentation : IFeedbackDocumentation
7+
internal class LightShadowStrengthDocumentation : IFeedbackDocumentation
88
{
9-
public Type FeedbackType => typeof(LightShadowStrenghtFeedback);
9+
public Type FeedbackType => typeof(LightShadowStrengthFeedback);
1010

1111
public void DrawDocumentation()
1212
{
13-
GUILayout.Label("Changes the target Light shadow strenght", EditorStyles.wordWrappedLabel);
13+
GUILayout.Label("Changes the target Light shadow strength", EditorStyles.wordWrappedLabel);
1414

1515
EditorGUILayout.Space(2);
1616

@@ -21,9 +21,9 @@ public void DrawDocumentation()
2121

2222
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
2323
{
24-
GUILayout.Label("- Use Starting Value: enables the starting shadow strenght", EditorStyles.wordWrappedLabel);
25-
GUILayout.Label("- Start: (if enabled) starting shadow strenght value", EditorStyles.wordWrappedLabel);
26-
GUILayout.Label("- End: end shadow strenght value to reach", EditorStyles.wordWrappedLabel);
24+
GUILayout.Label("- Use Starting Value: enables the starting shadow strength", EditorStyles.wordWrappedLabel);
25+
GUILayout.Label("- Start: (if enabled) starting shadow strength value", EditorStyles.wordWrappedLabel);
26+
GUILayout.Label("- End: end shadow strength value to reach", EditorStyles.wordWrappedLabel);
2727
}
2828

2929
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
using System;
2+
using UnityEditor;
3+
using UnityEngine;
4+
5+
namespace Juce.Feedbacks
6+
{
7+
internal class RectTransformAnchorMaxDocumentation : IFeedbackDocumentation
8+
{
9+
public Type FeedbackType => typeof(RectTransformAnchorMaxFeedback);
10+
11+
public void DrawDocumentation()
12+
{
13+
GUILayout.Label("Changes the target RectTransform anchorMax property to a certain value", EditorStyles.wordWrappedLabel);
14+
15+
EditorGUILayout.Space(2);
16+
17+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
18+
{
19+
GUILayout.Label("- Target: RectTransform that is going to be affected", EditorStyles.wordWrappedLabel);
20+
}
21+
22+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
23+
{
24+
GUILayout.Label("- Use Starting Value: enables the starting value", EditorStyles.wordWrappedLabel);
25+
GUILayout.Label("- Start: (if enabled) starting anchorMax value", EditorStyles.wordWrappedLabel);
26+
GUILayout.Label("- End: end anchorMax value to reach", EditorStyles.wordWrappedLabel);
27+
}
28+
29+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
30+
{
31+
GenericsDocumentation.DelayDocumentation();
32+
GenericsDocumentation.DurationDocumentation();
33+
}
34+
35+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
36+
{
37+
GenericsDocumentation.EasingDocumentation();
38+
}
39+
40+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
41+
{
42+
GenericsDocumentation.LoopDocumentation();
43+
}
44+
}
45+
}
46+
}

Editor/Documentation/RectTransform/RectTransformAnchorMaxDocumentation.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
using System;
2+
using UnityEditor;
3+
using UnityEngine;
4+
5+
namespace Juce.Feedbacks
6+
{
7+
internal class RectTransformAnchorMinDocumentation : IFeedbackDocumentation
8+
{
9+
public Type FeedbackType => typeof(RectTransformAnchorMinFeedback);
10+
11+
public void DrawDocumentation()
12+
{
13+
GUILayout.Label("Changes the target RectTransform anchorMin property to a certain value", EditorStyles.wordWrappedLabel);
14+
15+
EditorGUILayout.Space(2);
16+
17+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
18+
{
19+
GUILayout.Label("- Target: RectTransform that is going to be affected", EditorStyles.wordWrappedLabel);
20+
}
21+
22+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
23+
{
24+
GUILayout.Label("- Use Starting Value: enables the starting value", EditorStyles.wordWrappedLabel);
25+
GUILayout.Label("- Start: (if enabled) starting anchorMin value", EditorStyles.wordWrappedLabel);
26+
GUILayout.Label("- End: end anchorMin value to reach", EditorStyles.wordWrappedLabel);
27+
}
28+
29+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
30+
{
31+
GenericsDocumentation.DelayDocumentation();
32+
GenericsDocumentation.DurationDocumentation();
33+
}
34+
35+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
36+
{
37+
GenericsDocumentation.EasingDocumentation();
38+
}
39+
40+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
41+
{
42+
GenericsDocumentation.LoopDocumentation();
43+
}
44+
}
45+
}
46+
}

Editor/Documentation/RectTransform/RectTransformAnchorMinDocumentation.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
using System;
2+
using UnityEditor;
3+
using UnityEngine;
4+
5+
namespace Juce.Feedbacks
6+
{
7+
internal class RectTransformAnchorMinMaxDocumentation : IFeedbackDocumentation
8+
{
9+
public Type FeedbackType => typeof(RectTransformAnchorMinMaxFeedback);
10+
11+
public void DrawDocumentation()
12+
{
13+
GUILayout.Label("Changes the target RectTransform anchorMin and anchorMax property to a certain value", EditorStyles.wordWrappedLabel);
14+
15+
EditorGUILayout.Space(2);
16+
17+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
18+
{
19+
GUILayout.Label("- Target: RectTransform that is going to be affected", EditorStyles.wordWrappedLabel);
20+
}
21+
22+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
23+
{
24+
GUILayout.Label("Values (Min)", EditorStyles.wordWrappedLabel);
25+
GUILayout.Label("- Use Starting Value: enables the starting value", EditorStyles.wordWrappedLabel);
26+
GUILayout.Label("- Start: (if enabled) starting anchorMin value", EditorStyles.wordWrappedLabel);
27+
GUILayout.Label("- End: end anchorMin value to reach", EditorStyles.wordWrappedLabel);
28+
}
29+
30+
31+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
32+
{
33+
GUILayout.Label("Values (Max)", EditorStyles.wordWrappedLabel);
34+
GUILayout.Label("- Use Starting Value: enables the starting value", EditorStyles.wordWrappedLabel);
35+
GUILayout.Label("- Start: (if enabled) starting anchorMax value", EditorStyles.wordWrappedLabel);
36+
GUILayout.Label("- End: end anchorMax value to reach", EditorStyles.wordWrappedLabel);
37+
}
38+
39+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
40+
{
41+
GenericsDocumentation.DelayDocumentation();
42+
GenericsDocumentation.DurationDocumentation();
43+
}
44+
45+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
46+
{
47+
GenericsDocumentation.EasingDocumentation();
48+
}
49+
50+
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
51+
{
52+
GenericsDocumentation.LoopDocumentation();
53+
}
54+
}
55+
}
56+
}

Editor/Documentation/RectTransform/RectTransformAnchorMinMaxDocumentation.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Feedbacks/FeedbacksPlayerCE.cs

+14-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ internal class FeedbacksPlayerCE : Editor
2323

2424
private SerializedProperty feedbacksProperty;
2525

26-
private bool developerMode;
27-
2826
private void OnEnable()
2927
{
3028
GatherProperties();
@@ -170,6 +168,11 @@ private void DrawControlsSection()
170168
{
171169
CustomTarget.Restart();
172170
}
171+
172+
if (GUILayout.Button("Reset"))
173+
{
174+
CustomTarget.KillAndReset();
175+
}
173176
}
174177
GUILayout.EndHorizontal();
175178
}
@@ -381,6 +384,15 @@ private void ShowFeedbackContextMenu(Feedback feedback)
381384
{
382385
menu.AddDisabledItem(new GUIContent("Paste As New"), false);
383386
}
387+
menu.AddItem(new GUIContent("Duplicate As New"), false, () =>
388+
{
389+
int feedbackIndex = GetFeedbackIndex(feedback);
390+
391+
UndoHelper.Instance.BeginUndo("Duplicate");
392+
CopyPasteHelper.Instance.CopyFeedback(feedback);
393+
CopyPasteHelper.Instance.PasteFeedbackAsNew(this, feedbackIndex + 1);
394+
UndoHelper.Instance.EndUndo();
395+
});
384396
menu.AddSeparator("");
385397

386398
menu.AddItem(new GUIContent("Expand All"), false, () => FeedbacksSetExpanded(true));

Editor/Properties/LoopPropertyCE.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent
1414

1515
SerializedProperty loopModeProperty = property.FindPropertyRelative("loopMode");
1616

17-
if ((LoopMode)loopModeProperty.enumValueIndex == LoopMode.XTimes || (LoopMode)loopModeProperty.enumValueIndex == LoopMode.UntilManuallyStoped)
17+
if ((LoopMode)loopModeProperty.enumValueIndex == LoopMode.XTimes || (LoopMode)loopModeProperty.enumValueIndex == LoopMode.UntilManuallyStopped)
1818
{
1919
++elementsCount;
2020
}
@@ -39,7 +39,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
3939

4040
EditorGUI.PropertyField(layoutHelper.NextVerticalRect(), loopModeProperty);
4141

42-
if ((LoopMode)loopModeProperty.enumValueIndex == LoopMode.XTimes || (LoopMode)loopModeProperty.enumValueIndex == LoopMode.UntilManuallyStoped)
42+
if ((LoopMode)loopModeProperty.enumValueIndex == LoopMode.XTimes || (LoopMode)loopModeProperty.enumValueIndex == LoopMode.UntilManuallyStopped)
4343
{
4444
EditorGUI.PropertyField(layoutHelper.NextVerticalRect(), loopResetModeProperty);
4545
}

0 commit comments

Comments
 (0)