Skip to content

Commit

Permalink
FR-#24b6jmz-tooltips some initial work and testing, not quite finishe…
Browse files Browse the repository at this point in the history
…d yet
  • Loading branch information
TomNCatz committed Mar 27, 2022
1 parent 6d336c2 commit 8be57bf
Show file tree
Hide file tree
Showing 20 changed files with 6,664 additions and 5,288 deletions.
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/FieldDictionarySlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ 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 = template.GetGdo( "field" ) as GenericDataDictionary;

parentModel.TryGetValue(_label.Text, out GenericDataDictionary model);
Expand Down
2 changes: 1 addition & 1 deletion Code/NodeCode/NodeSlots/IntSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)

if( template.values.ContainsKey( "minStepSize" ) )
{
template.GetValue( "minStepSize", out double minStepSize );
template.GetValue( "minStepSize", out int minStepSize );
_field.Step = minStepSize;
}
}
Expand Down
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/KeyLinkSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)
template.GetValue( "label", out string label );
_label.Text = label;

template.GetValue( "info", out string info );
_field.HintTooltip = info;

template.GetValue( "slotType", out int slotType );
LinkType = slotType;

Expand Down
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/KeyManualSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public override void Init(GenericDataDictionary template, GenericDataObject pare
template.GetValue( "label", out string label );
_label.Text = label;

template.GetValue( "info", out string info );
_field.HintTooltip = info;

template.GetValue( "keyPrefix", out _keyPrefix );
_prefixLabel.Text = _keyPrefix;

Expand Down
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/KeySelectSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)
{
template.GetValue( "label", out string label );
_label.Text = label;

template.GetValue( "info", out string info );
_field.HintTooltip = info;

template.GetValue( "slotType", out int slotType );
LinkType = slotType;
Expand Down
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/KeySlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public override void Init(GenericDataDictionary template, GenericDataObject pare
template.GetValue( "label", out string label );
_label.Text = label;

template.GetValue( "info", out string info );
_field.HintTooltip = info;

template.GetValue( "keyPrefix", out _keyPrefix );
template.GetValue( "keySize", out _keySize );
template.GetValue( "slotType", out _linkType );
Expand Down
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/TextAreaRichSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)
template.GetValue( "label", out string label );
_label.Text = label;

template.GetValue( "info", out string info );
_field.HintTooltip = info;

template.GetValue( "minHeight", out float height );
_field.RectMinSize = new Vector2(0,height);
_display.RectMinSize = new Vector2(0,height);
Expand Down
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/TextAreaSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)
{
template.GetValue( "label", out string label );
_label.Text = label;

template.GetValue( "info", out string info );
_field.HintTooltip = info;

parentModel.TryGetValue(_label.Text, out GenericDataObject<string> model);
parentModel.TryGetValue(_label.Text, out GenericDataObject nullToken);
Expand Down
2 changes: 2 additions & 0 deletions Code/NodeCode/SlottedGraphNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public void SetSlots(GenericDataDictionary definition, GenericDataDictionary obj
{
_definition = definition;
definition.GetValue( "title", out _title );
definition.GetValue( "info", out string info );
this.HintTooltip = info;
Dirty = false;

if(objData != null)
Expand Down
4 changes: 2 additions & 2 deletions Nodes/Objects/ErrorPopup.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
margin_right = 200.0
margin_bottom = 60.0
rect_min_size = Vector2( 200, 60 )
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_horizontal = 7
size_flags_vertical = 7
window_title = "Encountered an Error"
__meta__ = {
"_edit_use_anchors_": false
Expand Down
2 changes: 2 additions & 0 deletions Nodes/Objects/Slots/KeyManualSlot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ _fieldPath = NodePath("Field")
margin_top = 13.0
margin_right = 36.0
margin_bottom = 27.0
hint_tooltip = "Test"
size_flags_horizontal = 3

[node name="PrefixLabel" type="Label" parent="."]
Expand All @@ -33,4 +34,5 @@ align = 2
margin_left = 80.0
margin_right = 138.0
margin_bottom = 40.0
hint_tooltip = "TRESTING"
size_flags_horizontal = 3
Loading

0 comments on commit 8be57bf

Please sign in to comment.