net.dreditor.ui.menus 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/ChapterUIImage.cs CHANGED
@@ -1,79 +1,79 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.EventObjectServices;
3
- using UnityEngine;
4
- using UnityEngine.Serialization;
5
- using UnityEngine.UI;
6
-
7
- namespace DREditor.UI.Menus
8
- {
9
- /// <summary>
10
- ///
11
- /// </summary>
12
- /// <remarks></remarks>
13
- [ClassHeader("")]
14
- public class ChapterUIImage : IntWithEventListener
15
- {
16
- /// <summary>
17
- ///
18
- /// </summary>
19
- [Divider]
20
- [Tooltip("")]
21
- [FormerlySerializedAs("image")]
22
- [SerializeField] protected Image chapterImage = null;
23
-
24
- /// <summary>
25
- ///
26
- /// </summary>
27
- [Tooltip("")]
28
- [SerializeField] protected Sprite defaultSprite = null;
29
-
30
-
31
- /// <summary>
32
- ///
33
- /// </summary>
34
- [Header("")]
35
- [Divider]
36
- [Tooltip("")]
37
- [SerializeField] protected int enableIDX = -1;
38
-
39
- /// <summary>
40
- ///
41
- /// </summary>
42
- [Tooltip("")]
43
- [SerializeField] protected int disableIDX = -1;
44
-
45
-
46
- /// <summary>
47
- ///
48
- /// </summary>
49
- [Header("")]
50
- [Divider]
51
- [Tooltip("")]
52
- [SerializeField] protected Sprite[] sprites = null;
53
-
54
-
55
- /// <inheritdoc/>
56
- protected override void OnValueChanged(int updatedValue)
57
- {
58
- base.OnValueChanged(updatedValue);
59
-
60
- ChangeUI(updatedValue);
61
- }
62
-
63
- /// <summary>
64
- ///
65
- /// </summary>
66
- /// <param name="chapterIndex"></param>
67
- protected virtual void ChangeUI(int chapterIndex)
68
- {
69
- if (chapterIndex == enableIDX)
70
- chapterImage.enabled = true;
71
-
72
- if (chapterIndex == disableIDX)
73
- chapterImage.enabled = false;
74
-
75
- if (chapterIndex < sprites.Length)
76
- chapterImage.sprite = sprites[chapterIndex] != null ? sprites[chapterIndex] : defaultSprite;
77
- }
78
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjectServices;
3
+ using UnityEngine;
4
+ using UnityEngine.Serialization;
5
+ using UnityEngine.UI;
6
+
7
+ namespace DREditor.UI.Menus
8
+ {
9
+ /// <summary>
10
+ ///
11
+ /// </summary>
12
+ /// <remarks></remarks>
13
+ [ClassHeader("")]
14
+ public class ChapterUIImage : IntWithEventListener
15
+ {
16
+ /// <summary>
17
+ ///
18
+ /// </summary>
19
+ [Divider]
20
+ [Tooltip("")]
21
+ [FormerlySerializedAs("image")]
22
+ [SerializeField] protected Image chapterImage = null;
23
+
24
+ /// <summary>
25
+ ///
26
+ /// </summary>
27
+ [Tooltip("")]
28
+ [SerializeField] protected Sprite defaultSprite = null;
29
+
30
+
31
+ /// <summary>
32
+ ///
33
+ /// </summary>
34
+ [Header("")]
35
+ [Divider]
36
+ [Tooltip("")]
37
+ [SerializeField] protected int enableIDX = -1;
38
+
39
+ /// <summary>
40
+ ///
41
+ /// </summary>
42
+ [Tooltip("")]
43
+ [SerializeField] protected int disableIDX = -1;
44
+
45
+
46
+ /// <summary>
47
+ ///
48
+ /// </summary>
49
+ [Header("")]
50
+ [Divider]
51
+ [Tooltip("")]
52
+ [SerializeField] protected Sprite[] sprites = null;
53
+
54
+
55
+ /// <inheritdoc/>
56
+ protected override void OnValueChanged(int updatedValue)
57
+ {
58
+ base.OnValueChanged(updatedValue);
59
+
60
+ ChangeUI(updatedValue);
61
+ }
62
+
63
+ /// <summary>
64
+ ///
65
+ /// </summary>
66
+ /// <param name="chapterIndex"></param>
67
+ protected virtual void ChangeUI(int chapterIndex)
68
+ {
69
+ if (chapterIndex == enableIDX)
70
+ chapterImage.enabled = true;
71
+
72
+ if (chapterIndex == disableIDX)
73
+ chapterImage.enabled = false;
74
+
75
+ if (chapterIndex < sprites.Length)
76
+ chapterImage.sprite = sprites[chapterIndex] != null ? sprites[chapterIndex] : defaultSprite;
77
+ }
78
+ }
79
79
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 05bdf963ec644c645adeeeb95e31d2d7
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 05bdf963ec644c645adeeeb95e31d2d7
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
package/ChapterUIText.cs CHANGED
@@ -1,92 +1,92 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.EventObjectServices;
3
- using TMPro;
4
- using UnityEngine;
5
- using UnityEngine.Serialization;
6
-
7
- namespace DREditor.UI.Menus
8
- {
9
- /// <summary>
10
- ///
11
- /// </summary>
12
- /// <remarks></remarks>
13
- [ClassHeader("")]
14
- public partial class ChapterUIText : IntWithEventListener
15
- {
16
- /// <summary>
17
- ///
18
- /// </summary>
19
- [Divider]
20
- [Tooltip("")]
21
- [FormerlySerializedAs("textO")]
22
- [SerializeField] protected TextMeshProUGUI chapterText = null;
23
-
24
- /// <summary>
25
- ///
26
- /// </summary>
27
- [Tooltip("")]
28
- [SerializeField] protected TextUIPositionPair defaultText;
29
-
30
-
31
- /// <summary>
32
- ///
33
- /// </summary>
34
- [Header("")]
35
- [Divider]
36
- [Tooltip("")]
37
- [SerializeField] protected int enableIDX = -1;
38
-
39
- /// <summary>
40
- ///
41
- /// </summary>
42
- [Tooltip("")]
43
- [SerializeField] protected int disableIDX = -1;
44
-
45
-
46
- /// <summary>
47
- ///
48
- /// </summary>
49
- [Header("")]
50
- [Divider]
51
- [Tooltip("")]
52
- [SerializeField] protected TextUIPositionPair[] texts = null;
53
-
54
-
55
- /// <inheritdoc/>
56
- protected override void OnValueChanged(int updatedValue)
57
- {
58
- base.OnValueChanged(updatedValue);
59
-
60
- ChangeUI(updatedValue);
61
- }
62
-
63
- /// <summary>
64
- ///
65
- /// </summary>
66
- /// <param name="chapterIndex"></param>
67
- protected virtual void ChangeUI(int chapterIndex)
68
- {
69
- if (chapterIndex >= 0 && chapterIndex < texts.Length)
70
- SetTextPair(texts[chapterIndex]);
71
- else
72
- SetTextPair(defaultText);
73
-
74
- if (chapterIndex == enableIDX)
75
- chapterText.enabled = true;
76
-
77
- if (chapterIndex == disableIDX)
78
- chapterText.enabled = false;
79
- }
80
-
81
- /// <summary>
82
- ///
83
- /// </summary>
84
- /// <param name="pair"></param>
85
- protected virtual void SetTextPair(TextUIPositionPair pair)
86
- {
87
- chapterText.text = pair.text;
88
-
89
- chapterText.gameObject.transform.localPosition = pair.position;
90
- }
91
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjectServices;
3
+ using TMPro;
4
+ using UnityEngine;
5
+ using UnityEngine.Serialization;
6
+
7
+ namespace DREditor.UI.Menus
8
+ {
9
+ /// <summary>
10
+ ///
11
+ /// </summary>
12
+ /// <remarks></remarks>
13
+ [ClassHeader("")]
14
+ public partial class ChapterUIText : IntWithEventListener
15
+ {
16
+ /// <summary>
17
+ ///
18
+ /// </summary>
19
+ [Divider]
20
+ [Tooltip("")]
21
+ [FormerlySerializedAs("textO")]
22
+ [SerializeField] protected TextMeshProUGUI chapterText = null;
23
+
24
+ /// <summary>
25
+ ///
26
+ /// </summary>
27
+ [Tooltip("")]
28
+ [SerializeField] protected TextUIPositionPair defaultText;
29
+
30
+
31
+ /// <summary>
32
+ ///
33
+ /// </summary>
34
+ [Header("")]
35
+ [Divider]
36
+ [Tooltip("")]
37
+ [SerializeField] protected int enableIDX = -1;
38
+
39
+ /// <summary>
40
+ ///
41
+ /// </summary>
42
+ [Tooltip("")]
43
+ [SerializeField] protected int disableIDX = -1;
44
+
45
+
46
+ /// <summary>
47
+ ///
48
+ /// </summary>
49
+ [Header("")]
50
+ [Divider]
51
+ [Tooltip("")]
52
+ [SerializeField] protected TextUIPositionPair[] texts = null;
53
+
54
+
55
+ /// <inheritdoc/>
56
+ protected override void OnValueChanged(int updatedValue)
57
+ {
58
+ base.OnValueChanged(updatedValue);
59
+
60
+ ChangeUI(updatedValue);
61
+ }
62
+
63
+ /// <summary>
64
+ ///
65
+ /// </summary>
66
+ /// <param name="chapterIndex"></param>
67
+ protected virtual void ChangeUI(int chapterIndex)
68
+ {
69
+ if (chapterIndex >= 0 && chapterIndex < texts.Length)
70
+ SetTextPair(texts[chapterIndex]);
71
+ else
72
+ SetTextPair(defaultText);
73
+
74
+ if (chapterIndex == enableIDX)
75
+ chapterText.enabled = true;
76
+
77
+ if (chapterIndex == disableIDX)
78
+ chapterText.enabled = false;
79
+ }
80
+
81
+ /// <summary>
82
+ ///
83
+ /// </summary>
84
+ /// <param name="pair"></param>
85
+ protected virtual void SetTextPair(TextUIPositionPair pair)
86
+ {
87
+ chapterText.text = pair.text;
88
+
89
+ chapterText.gameObject.transform.localPosition = pair.position;
90
+ }
91
+ }
92
92
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 9a7900e8a74de9d4aa11e57456365aaf
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 9a7900e8a74de9d4aa11e57456365aaf
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,28 +1,28 @@
1
- {
2
- "name": "DREditor.UI.Menus",
3
- "rootNamespace": "",
4
- "references": [
5
- "DREditor",
6
- "DREditor.UI",
7
- "Unity.TextMeshPro",
8
- "Unity.InputSystem",
9
- "DREditor.EventObjectServices",
10
- "DREditor.States",
11
- "DREditor.Fading",
12
- "DREditor.Progressing.Handling",
13
- "DREditor.Controls",
14
- "DREditor.Audio",
15
- "DREditor.UIHandling",
16
- "DREditor.DialogueMechanics.Investigation",
17
- "DREditor.Investigations"
18
- ],
19
- "includePlatforms": [],
20
- "excludePlatforms": [],
21
- "allowUnsafeCode": false,
22
- "overrideReferences": false,
23
- "precompiledReferences": [],
24
- "autoReferenced": true,
25
- "defineConstraints": [],
26
- "versionDefines": [],
27
- "noEngineReferences": false
1
+ {
2
+ "name": "DREditor.UI.Menus",
3
+ "rootNamespace": "",
4
+ "references": [
5
+ "DREditor",
6
+ "DREditor.UI",
7
+ "Unity.TextMeshPro",
8
+ "Unity.InputSystem",
9
+ "DREditor.EventObjectServices",
10
+ "DREditor.States",
11
+ "DREditor.Fading",
12
+ "DREditor.Progressing.Handling",
13
+ "DREditor.Controls",
14
+ "DREditor.Audio",
15
+ "DREditor.UIHandling",
16
+ "DREditor.DialogueMechanics.Investigation",
17
+ "DREditor.Investigations"
18
+ ],
19
+ "includePlatforms": [],
20
+ "excludePlatforms": [],
21
+ "allowUnsafeCode": false,
22
+ "overrideReferences": false,
23
+ "precompiledReferences": [],
24
+ "autoReferenced": true,
25
+ "defineConstraints": [],
26
+ "versionDefines": [],
27
+ "noEngineReferences": false
28
28
  }
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: eca1c04d9d6cb474f9793955e8f7085e
3
- AssemblyDefinitionImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: eca1c04d9d6cb474f9793955e8f7085e
3
+ AssemblyDefinitionImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant: