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