Skip to content

Commit

Permalink
FR-#24b6jmz-tooltips finalizing changes and prepping for release
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNCatz committed Mar 28, 2022
1 parent 8be57bf commit 49c6c7f
Show file tree
Hide file tree
Showing 62 changed files with 7,101 additions and 7,168 deletions.
8 changes: 8 additions & 0 deletions Code/NodeCode/NodeSlots/AutoSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions Code/NodeCode/NodeSlots/BooleanSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> model);
if(model != null)
Expand Down
7 changes: 7 additions & 0 deletions Code/NodeCode/NodeSlots/ColorSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
4 changes: 4 additions & 0 deletions Code/NodeCode/NodeSlots/DateTimeOffsetSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions Code/NodeCode/NodeSlots/DoubleSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
8 changes: 8 additions & 0 deletions Code/NodeCode/NodeSlots/EnumSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> values );
foreach( string value in values )
{
Expand Down
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/FieldListSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions Code/NodeCode/NodeSlots/FlagItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Label>( _titlePath );
Expand Down
4 changes: 4 additions & 0 deletions Code/NodeCode/NodeSlots/FlagsSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ 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;

template.GetValue("flags", out List<string> flags);
foreach(var flag in flags)
{
FlagItem item = flagsScene.Instance() as FlagItem;
AddChild(item);
item.Label = flag;
item.Info = info;
item.OnValueUpdated += OnValueChange;
items.Add(item);
}
Expand Down
8 changes: 8 additions & 0 deletions Code/NodeCode/NodeSlots/FloatSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.LineEdit.AlignEnum.Right : Godot.LineEdit.AlignEnum.Left;

template.GetValue( "hasMax", out bool hasMax );
template.GetValue( "hasMin", out bool hasMin );

Expand Down
8 changes: 8 additions & 0 deletions Code/NodeCode/NodeSlots/IntSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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 );

Expand Down
5 changes: 5 additions & 0 deletions Code/NodeCode/NodeSlots/KeyLinkSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)
_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( "slotType", out int slotType );
LinkType = slotType;

Expand Down
4 changes: 4 additions & 0 deletions Code/NodeCode/NodeSlots/KeyManualSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ public override void Init(GenericDataDictionary template, GenericDataObject pare
_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;

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

Expand Down
5 changes: 5 additions & 0 deletions Code/NodeCode/NodeSlots/KeySelectSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)
_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( "slotType", out int slotType );
LinkType = slotType;
Expand Down
5 changes: 5 additions & 0 deletions Code/NodeCode/NodeSlots/KeySlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ public override void Init(GenericDataDictionary template, GenericDataObject pare
_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( "keyPrefix", out _keyPrefix );
template.GetValue( "keySize", out _keySize );
template.GetValue( "slotType", out _linkType );
Expand Down
3 changes: 3 additions & 0 deletions Code/NodeCode/NodeSlots/LinkToChildSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,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;

if( template.values.ContainsKey( App.GRAPH_EXPLICIT_KEY ) )
{
Expand Down
8 changes: 8 additions & 0 deletions Code/NodeCode/NodeSlots/LongSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,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;

parentModel.TryGetValue(_label.Text, out GenericDataObject<string> model);
if(model != null)
{
Expand Down
8 changes: 8 additions & 0 deletions Code/NodeCode/NodeSlots/RelativePathSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,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( "startOffset", out _startOffset );
template.GetValue( "prefix", out _prefix );
Expand Down
1 change: 1 addition & 0 deletions Code/NodeCode/NodeSlots/TextAreaRichSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)
_label.Text = label;

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

template.GetValue( "minHeight", out float height );
Expand Down
1 change: 1 addition & 0 deletions Code/NodeCode/NodeSlots/TextAreaSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void Init(GenericDataDictionary template, GenericDataObject parentModel)
_label.Text = label;

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

parentModel.TryGetValue(_label.Text, out GenericDataObject<string> model);
Expand Down
7 changes: 7 additions & 0 deletions Code/NodeCode/NodeSlots/TextLineSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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;
_field.HintTooltip = info;

template.GetValue( "expandedField", out bool expandedField );
_label.SizeFlagsHorizontal = expandedField ? (int) SizeFlags.Fill : (int) SizeFlags.ExpandFill;

parentModel.TryGetValue(_label.Text, out GenericDataObject<string> model);
parentModel.TryGetValue(_label.Text, out GenericDataObject nullToken);
Expand Down
4 changes: 4 additions & 0 deletions Code/NodeCode/NodeSlots/TimeSpanSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,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;

template.GetValue( "asSeconds", out asSeconds );

Expand Down
5 changes: 5 additions & 0 deletions Code/NodeCode/NodeSlots/TypeSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public override void _GuiInput( InputEvent @event )

public void Init(GenericDataDictionary template, GenericDataObject parentModel)
{
template.GetValue( "info", out string info );
_label.HintTooltip = info;
_assemblyLabel.HintTooltip = info;
_typeLabel.HintTooltip = info;

template.GetValue( "Class Assembly", out assembly );
_assemblyLabel.Text = assembly;

Expand Down
5 changes: 5 additions & 0 deletions Code/NodeCode/NodeSlots/Vector2Slot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ 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;
_x.HintTooltip = info;
_y.HintTooltip = info;

parentModel.TryGetValue(_label.Text, out GenericDataDictionary model);
if(model != null)
Expand Down
6 changes: 6 additions & 0 deletions Code/NodeCode/NodeSlots/Vector3Slot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ 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;
_x.HintTooltip = info;
_y.HintTooltip = info;
_z.HintTooltip = info;

parentModel.TryGetValue(_label.Text, out GenericDataDictionary model);
if(model != null)
Expand Down
7 changes: 7 additions & 0 deletions Code/NodeCode/NodeSlots/Vector4Slot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,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;
_x.HintTooltip = info;
_y.HintTooltip = info;
_z.HintTooltip = info;
_w.HintTooltip = info;

parentModel.TryGetValue(_label.Text, out GenericDataDictionary model);
if(model != null)
Expand Down
2 changes: 1 addition & 1 deletion Code/NodeCode/SlottedGraphNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public void CloseRequest()

private void OnResizeRequest(Vector2 newSize)
{
RectSize = new Vector2( newSize.x, newSize.y < RectSize.y ? newSize.y : RectSize.y );
RectSize = newSize;
_model.AddValue( App.NODE_SIZE_KEY, RectSize );
Dirty = true;
}
Expand Down
1 change: 1 addition & 0 deletions Nodes/Objects/Slots/BooleanSlot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ _fieldPath = NodePath("../BooleanSlot/Field")
margin_top = 13.0
margin_right = 110.0
margin_bottom = 27.0
mouse_filter = 0
size_flags_horizontal = 3

[node name="Field" type="CheckBox" parent="."]
Expand Down
1 change: 1 addition & 0 deletions Nodes/Objects/Slots/ColorSlot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ margin_bottom = 18.0
margin_top = 2.0
margin_right = 74.0
margin_bottom = 16.0
mouse_filter = 0
size_flags_horizontal = 3
text = "Color"

Expand Down
1 change: 1 addition & 0 deletions Nodes/Objects/Slots/DateTimeOffsetSlot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ margin_bottom = 14.0
[node name="Label" type="Label" parent="HBoxContainer"]
margin_right = 74.0
margin_bottom = 14.0
mouse_filter = 0
size_flags_horizontal = 3
text = "Color"

Expand Down
1 change: 1 addition & 0 deletions Nodes/Objects/Slots/DateTimeSlot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ margin_bottom = 14.0
[node name="Label" type="Label" parent="HBoxContainer"]
margin_right = 74.0
margin_bottom = 14.0
mouse_filter = 0
size_flags_horizontal = 3
text = "Color"

Expand Down
1 change: 1 addition & 0 deletions Nodes/Objects/Slots/DoubleSlot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ _fieldPath = NodePath("Field")
margin_top = 13.0
margin_right = 60.0
margin_bottom = 27.0
mouse_filter = 0
size_flags_horizontal = 3

[node name="Field" type="SpinBox" parent="."]
Expand Down
1 change: 1 addition & 0 deletions Nodes/Objects/Slots/EnumSlot.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ _fieldPath = NodePath("Field")
margin_top = 13.0
margin_right = 7.0
margin_bottom = 27.0
mouse_filter = 0
size_flags_horizontal = 3

[node name="Field" type="OptionButton" parent="."]
Expand Down
Loading

0 comments on commit 49c6c7f

Please sign in to comment.