jp.keijiro.klutter-tools 2.2.0 → 2.3.0
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,12 +1,17 @@
|
|
|
1
1
|
<ui:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" noNamespaceSchemaLocation="../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
|
|
2
|
-
<ui:VisualElement data-source-type="KlutterTools.InspectorNote, KlutterTools.Runtime" name="note" style="margin-top:
|
|
3
|
-
<ui:Label text="Note Body" binding-path="_noteText" style="white-space: normal;"
|
|
2
|
+
<ui:VisualElement data-source-type="KlutterTools.InspectorNote, KlutterTools.Runtime" name="note" style="margin-top: 7px; margin-right: 9px; margin-bottom: 2px; margin-left: 0; padding-top: 6px; padding-right: 6px; padding-bottom: 6px; padding-left: 6px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px;">
|
|
3
|
+
<ui:Label text="Note Body" binding-path="_noteText" style="white-space: normal;">
|
|
4
|
+
<Bindings>
|
|
5
|
+
<ui:DataBinding property="style.color" data-source-path="_textColor" binding-mode="ToTarget" />
|
|
6
|
+
</Bindings>
|
|
7
|
+
</ui:Label>
|
|
4
8
|
<Bindings>
|
|
5
9
|
<ui:DataBinding property="style.backgroundColor" data-source-path="_backgroundColor" binding-mode="ToTarget" />
|
|
6
10
|
</Bindings>
|
|
7
11
|
</ui:VisualElement>
|
|
8
|
-
<ui:VisualElement name="note-editor"
|
|
9
|
-
<ui:TextField binding-path="_noteText" multiline="true" style="white-space: normal;" />
|
|
12
|
+
<ui:VisualElement name="note-editor">
|
|
13
|
+
<ui:TextField binding-path="_noteText" multiline="true" style="white-space: normal; margin-top: 10px; margin-bottom: 8px;" />
|
|
14
|
+
<uie:ColorField label="Text" binding-path="_textColor" />
|
|
10
15
|
<uie:ColorField label="Background" binding-path="_backgroundColor" style="margin-top: 4px; margin-bottom: 4px;" />
|
|
11
16
|
<ui:Button text="Done" name="done-button" />
|
|
12
17
|
</ui:VisualElement>
|
package/Runtime/InspectorNote.cs
CHANGED
|
@@ -10,16 +10,17 @@ public sealed class InspectorNote : MonoBehaviour
|
|
|
10
10
|
#pragma warning disable CS0414
|
|
11
11
|
|
|
12
12
|
[SerializeField] string _noteText =
|
|
13
|
-
"To edit the note, select \"
|
|
13
|
+
"To edit the note, select \"Edit Note\" from the context menu.";
|
|
14
14
|
|
|
15
15
|
[SerializeField] bool _showEditor = false;
|
|
16
16
|
|
|
17
|
-
[SerializeField] Color
|
|
17
|
+
[SerializeField] Color _textColor = new Color32(210, 210, 210, 255);
|
|
18
|
+
[SerializeField] Color _backgroundColor = new Color32(38, 38, 38, 255);
|
|
18
19
|
|
|
19
20
|
#pragma warning restore CS0414
|
|
20
21
|
|
|
21
|
-
[ContextMenu("
|
|
22
|
-
void
|
|
22
|
+
[ContextMenu("Edit Note")]
|
|
23
|
+
void ShowNoteEditor() => _showEditor = true;
|
|
23
24
|
|
|
24
25
|
#endif
|
|
25
26
|
}
|