From 49c6c7fa56347912c5cf57abf75a31ac625534d6 Mon Sep 17 00:00:00 2001 From: Tom Norris Date: Mon, 28 Mar 2022 12:16:48 -0700 Subject: [PATCH] FR-#24b6jmz-tooltips finalizing changes and prepping for release --- Code/NodeCode/NodeSlots/AutoSlot.cs | 8 + Code/NodeCode/NodeSlots/BooleanSlot.cs | 4 + Code/NodeCode/NodeSlots/ColorSlot.cs | 7 + Code/NodeCode/NodeSlots/DateTimeOffsetSlot.cs | 4 + Code/NodeCode/NodeSlots/DoubleSlot.cs | 8 + Code/NodeCode/NodeSlots/EnumSlot.cs | 8 + Code/NodeCode/NodeSlots/FieldListSlot.cs | 3 + Code/NodeCode/NodeSlots/FlagItem.cs | 9 + Code/NodeCode/NodeSlots/FlagsSlot.cs | 4 + Code/NodeCode/NodeSlots/FloatSlot.cs | 8 + Code/NodeCode/NodeSlots/IntSlot.cs | 8 + Code/NodeCode/NodeSlots/KeyLinkSlot.cs | 5 + Code/NodeCode/NodeSlots/KeyManualSlot.cs | 4 + Code/NodeCode/NodeSlots/KeySelectSlot.cs | 5 + Code/NodeCode/NodeSlots/KeySlot.cs | 5 + Code/NodeCode/NodeSlots/LinkToChildSlot.cs | 3 + Code/NodeCode/NodeSlots/LongSlot.cs | 8 + Code/NodeCode/NodeSlots/RelativePathSlot.cs | 8 + Code/NodeCode/NodeSlots/TextAreaRichSlot.cs | 1 + Code/NodeCode/NodeSlots/TextAreaSlot.cs | 1 + Code/NodeCode/NodeSlots/TextLineSlot.cs | 7 + Code/NodeCode/NodeSlots/TimeSpanSlot.cs | 4 + Code/NodeCode/NodeSlots/TypeSlot.cs | 5 + Code/NodeCode/NodeSlots/Vector2Slot.cs | 5 + Code/NodeCode/NodeSlots/Vector3Slot.cs | 6 + Code/NodeCode/NodeSlots/Vector4Slot.cs | 7 + Code/NodeCode/SlottedGraphNode.cs | 2 +- Nodes/Objects/Slots/BooleanSlot.tscn | 1 + Nodes/Objects/Slots/ColorSlot.tscn | 1 + Nodes/Objects/Slots/DateTimeOffsetSlot.tscn | 1 + Nodes/Objects/Slots/DateTimeSlot.tscn | 1 + Nodes/Objects/Slots/DoubleSlot.tscn | 1 + Nodes/Objects/Slots/EnumSlot.tscn | 1 + Nodes/Objects/Slots/FieldDictionarySlot.tscn | 2 +- Nodes/Objects/Slots/FieldListSlot.tscn | 2 +- Nodes/Objects/Slots/FlagsItem.tscn | 1 + Nodes/Objects/Slots/FlagsSlot.tscn | 2 + Nodes/Objects/Slots/FloatSlot.tscn | 1 + Nodes/Objects/Slots/InfoSlot.tscn | 1 - Nodes/Objects/Slots/IntSlot.tscn | 2 +- Nodes/Objects/Slots/KeyLinkSlot.tscn | 2 +- Nodes/Objects/Slots/KeyManualSlot.tscn | 1 + Nodes/Objects/Slots/KeySelectSlot.tscn | 1 + Nodes/Objects/Slots/KeySlot.tscn | 1 + Nodes/Objects/Slots/LinkToChildSlot.tscn | 1 + Nodes/Objects/Slots/LinkToParentSlot.tscn | 1 + Nodes/Objects/Slots/LongSlot.tscn | 1 + Nodes/Objects/Slots/RelativePathSlot.tscn | 1 + Nodes/Objects/Slots/SubGraphSlot.tscn | 1 + Nodes/Objects/Slots/TextAreaRichSlot.tscn | 3 +- Nodes/Objects/Slots/TextAreaSlot.tscn | 2 + Nodes/Objects/Slots/TextLineSlot.tscn | 3 +- Nodes/Objects/Slots/TimeSpanSlot.tscn | 2 + Nodes/Objects/Slots/TypeSlot.tscn | 2 + Nodes/Objects/Slots/Vector2Slot.tscn | 2 +- Nodes/Objects/Slots/Vector3Slot.tscn | 2 +- Nodes/Objects/Slots/Vector4Slot.tscn | 2 +- Resources/TEMPLATE.tmplt | 450 +- .../ServerCacheTemplate.ngmap | 2159 ++-- Templates-and-Graphs/TEMPLATE.ngmap | 9961 +++++++++-------- Templates-and-Graphs/test.ngmap | 1499 --- export_presets.cfg | 8 +- 62 files changed, 7101 insertions(+), 7168 deletions(-) delete mode 100644 Templates-and-Graphs/test.ngmap diff --git a/Code/NodeCode/NodeSlots/AutoSlot.cs b/Code/NodeCode/NodeSlots/AutoSlot.cs index 61412fa..7b00a6b 100644 --- a/Code/NodeCode/NodeSlots/AutoSlot.cs +++ b/Code/NodeCode/NodeSlots/AutoSlot.cs @@ -25,6 +25,14 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel) template.GetValue( "label", out string label ); _label.Text = label; + template.GetValue( "info", out string info ); + _label.HintTooltip = info; + _field.HintTooltip = info; + + template.GetValue( "expandedField", out bool expandedField ); + _label.SizeFlagsHorizontal = expandedField ? (int) SizeFlags.Fill : (int) SizeFlags.ExpandFill; + _field.Align = expandedField ? Godot.Label.AlignEnum.Right : Godot.Label.AlignEnum.Left; + template.GetValue( "defaultValue", out string text ); _field.Text = text; diff --git a/Code/NodeCode/NodeSlots/BooleanSlot.cs b/Code/NodeCode/NodeSlots/BooleanSlot.cs index d917e65..1646029 100644 --- a/Code/NodeCode/NodeSlots/BooleanSlot.cs +++ b/Code/NodeCode/NodeSlots/BooleanSlot.cs @@ -38,6 +38,10 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel) { template.GetValue( "label", out string label ); _label.Text = label; + + template.GetValue( "info", out string info ); + _label.HintTooltip = info; + _field.HintTooltip = info; parentModel.TryGetValue(_label.Text, out GenericDataObject model); if(model != null) diff --git a/Code/NodeCode/NodeSlots/ColorSlot.cs b/Code/NodeCode/NodeSlots/ColorSlot.cs index d5dc744..d3d2cb6 100644 --- a/Code/NodeCode/NodeSlots/ColorSlot.cs +++ b/Code/NodeCode/NodeSlots/ColorSlot.cs @@ -45,6 +45,13 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel) { template.GetValue( "label", out string label ); _label.Text = label; + + template.GetValue( "info", out string info ); + _label.HintTooltip = info; + _colorRect.HintTooltip = info; + + template.GetValue( "expandedField", out bool expandedField ); + _label.SizeFlagsHorizontal = expandedField ? (int) SizeFlags.Fill : (int) SizeFlags.ExpandFill; template.GetValue( "asHtml", out asHtml ); diff --git a/Code/NodeCode/NodeSlots/DateTimeOffsetSlot.cs b/Code/NodeCode/NodeSlots/DateTimeOffsetSlot.cs index 38f1e26..40d0f11 100644 --- a/Code/NodeCode/NodeSlots/DateTimeOffsetSlot.cs +++ b/Code/NodeCode/NodeSlots/DateTimeOffsetSlot.cs @@ -206,6 +206,10 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel) { template.GetValue( "label", out string label ); _label.Text = label; + + template.GetValue( "info", out string info ); + _label.HintTooltip = info; + _field.HintTooltip = info; _model = parentModel.TryGetRelativeGdo(_label.Text); if(_model != null) diff --git a/Code/NodeCode/NodeSlots/DoubleSlot.cs b/Code/NodeCode/NodeSlots/DoubleSlot.cs index c2baaf5..d07a2a2 100644 --- a/Code/NodeCode/NodeSlots/DoubleSlot.cs +++ b/Code/NodeCode/NodeSlots/DoubleSlot.cs @@ -29,6 +29,14 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel) template.GetValue( "label", out string label ); _label.Text = label; + template.GetValue( "info", out string info ); + _label.HintTooltip = info; + _field.HintTooltip = info; + + template.GetValue( "expandedField", out bool expandedField ); + _label.SizeFlagsHorizontal = expandedField ? (int) SizeFlags.Fill : (int) SizeFlags.ExpandFill; + _field.Align = expandedField ? Godot.LineEdit.AlignEnum.Right : Godot.LineEdit.AlignEnum.Left; + template.GetValue( "hasMax", out bool hasMax ); template.GetValue( "hasMin", out bool hasMin ); diff --git a/Code/NodeCode/NodeSlots/EnumSlot.cs b/Code/NodeCode/NodeSlots/EnumSlot.cs index 83f0c14..c72fa33 100644 --- a/Code/NodeCode/NodeSlots/EnumSlot.cs +++ b/Code/NodeCode/NodeSlots/EnumSlot.cs @@ -28,6 +28,14 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel) template.GetValue( "label", out string label ); _label.Text = label; + template.GetValue( "info", out string info ); + _label.HintTooltip = info; + _field.HintTooltip = info; + + template.GetValue( "expandedField", out bool expandedField ); + _label.SizeFlagsHorizontal = expandedField ? (int) SizeFlags.Fill : (int) SizeFlags.ExpandFill; + _field.Align = expandedField ? Godot.Button.TextAlign.Right : Godot.Button.TextAlign.Left; + template.GetValue( "values", out List values ); foreach( string value in values ) { diff --git a/Code/NodeCode/NodeSlots/FieldListSlot.cs b/Code/NodeCode/NodeSlots/FieldListSlot.cs index e1311d4..3801c79 100644 --- a/Code/NodeCode/NodeSlots/FieldListSlot.cs +++ b/Code/NodeCode/NodeSlots/FieldListSlot.cs @@ -47,6 +47,9 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel) template.GetValue( "label", out string label ); _label.Text = label; template.GetValue( "field", out _field ); + + template.GetValue( "info", out string info ); + _label.HintTooltip = info; parentModel.TryGetValue(_label.Text, out GenericDataList model); if(model != null) diff --git a/Code/NodeCode/NodeSlots/FlagItem.cs b/Code/NodeCode/NodeSlots/FlagItem.cs index af356fb..a659d9f 100644 --- a/Code/NodeCode/NodeSlots/FlagItem.cs +++ b/Code/NodeCode/NodeSlots/FlagItem.cs @@ -32,6 +32,15 @@ public bool Value } private bool _value; + public string Info + { + set + { + _title.HintTooltip = value; + _check.HintTooltip = value; + } + } + public override void _Ready() { _title = this.GetNodeFromPath