net.dreditor.ui.menus 0.1.6 → 0.1.7

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.
@@ -1,73 +1,73 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using TMPro;
3
- using UnityEngine;
4
-
5
- namespace DREditor.UI.Menus
6
- {
7
- /// <summary>
8
- ///
9
- /// </summary>
10
- /// <remarks></remarks>
11
- [ClassHeader(nameof(SelectHandler) +
12
- "\n\n")]
13
- public class TextColorSelect : SelectHandler
14
- {
15
- /// <summary>
16
- ///
17
- /// </summary>
18
- [Tooltip("")]
19
- [SerializeField] protected TextMeshProUGUI tmpText = null;
20
-
21
- /// <summary>
22
- ///
23
- /// </summary>
24
- [Tooltip("")]
25
- [SerializeField] protected Color initialColor = Color.black;
26
-
27
- /// <summary>
28
- ///
29
- /// </summary>
30
- [Tooltip("")]
31
- [SerializeField] protected Color selectedColor = Color.white;
32
-
33
-
34
- /// <summary>
35
- ///
36
- /// </summary>
37
- protected virtual void Awake()
38
- {
39
- if (tmpText == null && !TryGetComponent(out tmpText) && !GetComponentInChildren(out tmpText))
40
- UnityEngine.Debug.LogError($"{ToString()}: " + gameObject.name + ": COULD NOT FIND ASSIGNABLE TEXT");
41
-
42
- initialColor = tmpText.color;
43
- }
44
-
45
- /// <summary>
46
- ///
47
- /// </summary>
48
- /// <param name="tmpText"></param>
49
- /// <returns></returns>
50
- protected virtual bool GetComponentInChildren(out TextMeshProUGUI tmpText)
51
- {
52
- var children = GetComponentInChildren<TextMeshProUGUI>();
53
-
54
- tmpText = children;
55
-
56
- return tmpText != null;
57
- }
58
-
59
- /// <inheritdoc/>
60
- public override void Select()
61
- {
62
- if (tmpText)
63
- tmpText.color = selectedColor;
64
- }
65
-
66
- /// <inheritdoc/>
67
- public override void Deselect()
68
- {
69
- if (tmpText)
70
- tmpText.color = initialColor;
71
- }
72
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using TMPro;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.UI.Menus
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ /// <remarks></remarks>
11
+ [ClassHeader(nameof(SelectHandler) +
12
+ "\n\n")]
13
+ public class TextColorSelect : SelectHandler
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ [Tooltip("")]
19
+ [SerializeField] protected TextMeshProUGUI tmpText = null;
20
+
21
+ /// <summary>
22
+ ///
23
+ /// </summary>
24
+ [Tooltip("")]
25
+ [SerializeField] protected Color initialColor = Color.black;
26
+
27
+ /// <summary>
28
+ ///
29
+ /// </summary>
30
+ [Tooltip("")]
31
+ [SerializeField] protected Color selectedColor = Color.white;
32
+
33
+
34
+ /// <summary>
35
+ ///
36
+ /// </summary>
37
+ protected virtual void Awake()
38
+ {
39
+ if (tmpText == null && !TryGetComponent(out tmpText) && !GetComponentInChildren(out tmpText))
40
+ UnityEngine.Debug.LogError($"{ToString()}: " + gameObject.name + ": COULD NOT FIND ASSIGNABLE TEXT");
41
+
42
+ initialColor = tmpText.color;
43
+ }
44
+
45
+ /// <summary>
46
+ ///
47
+ /// </summary>
48
+ /// <param name="tmpText"></param>
49
+ /// <returns></returns>
50
+ protected virtual bool GetComponentInChildren(out TextMeshProUGUI tmpText)
51
+ {
52
+ var children = GetComponentInChildren<TextMeshProUGUI>();
53
+
54
+ tmpText = children;
55
+
56
+ return tmpText != null;
57
+ }
58
+
59
+ /// <inheritdoc/>
60
+ public override void Select()
61
+ {
62
+ if (tmpText)
63
+ tmpText.color = selectedColor;
64
+ }
65
+
66
+ /// <inheritdoc/>
67
+ public override void Deselect()
68
+ {
69
+ if (tmpText)
70
+ tmpText.color = initialColor;
71
+ }
72
+ }
73
73
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 9207e4f7cf624394c88598af6e9f8775
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: 9207e4f7cf624394c88598af6e9f8775
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,25 +1,25 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using UnityEngine;
3
-
4
- namespace DREditor.UI.Menus
5
- {
6
- /// <summary>
7
- ///
8
- /// </summary>
9
- /// <remarks></remarks>
10
- [System.Serializable]
11
- public class TextUIPositionPair
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- [Tooltip("")]
17
- public string text;
18
-
19
- /// <summary>
20
- ///
21
- /// </summary>
22
- [Tooltip("")]
23
- public Vector3 position = Vector3.zero;
24
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using UnityEngine;
3
+
4
+ namespace DREditor.UI.Menus
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ /// <remarks></remarks>
10
+ [System.Serializable]
11
+ public class TextUIPositionPair
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [Tooltip("")]
17
+ public string text;
18
+
19
+ /// <summary>
20
+ ///
21
+ /// </summary>
22
+ [Tooltip("")]
23
+ public Vector3 position = Vector3.zero;
24
+ }
25
25
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 9a3de3bdc2489444483a3cf48ecee4a4
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: 9a3de3bdc2489444483a3cf48ecee4a4
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: