Fixed Field outline not disappearing when switching tools
This commit is contained in:
@@ -954,7 +954,7 @@ z_index = 1
|
|||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
|
|
||||||
[node name="Yeli" parent="YSorted" instance=ExtResource("26_vnhck")]
|
[node name="Yeli" parent="YSorted" instance=ExtResource("26_vnhck")]
|
||||||
position = Vector2(6403, 3362)
|
position = Vector2(6385, 3356)
|
||||||
_timelinesToPlay = PackedStringArray("yeli_quest_select")
|
_timelinesToPlay = PackedStringArray("yeli_quest_select")
|
||||||
|
|
||||||
[node name="Vesna" parent="YSorted" instance=ExtResource("27_6aw34")]
|
[node name="Vesna" parent="YSorted" instance=ExtResource("27_6aw34")]
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public partial class InteractionArea2D : Node2D
|
|||||||
[Export] private int _id = -1; // TODO: remove
|
[Export] private int _id = -1; // TODO: remove
|
||||||
|
|
||||||
private Material[] _backupMaterials;
|
private Material[] _backupMaterials;
|
||||||
|
private bool _initializationComplete;
|
||||||
|
|
||||||
[Signal] public delegate void InteractedToolEventHandler(int id); // TODO: remove
|
[Signal] public delegate void InteractedToolEventHandler(int id); // TODO: remove
|
||||||
|
|
||||||
@@ -33,6 +34,8 @@ public partial class InteractionArea2D : Node2D
|
|||||||
Visible = value;
|
Visible = value;
|
||||||
_selectionChangeListener.ProcessMode = value ? ProcessModeEnum.Inherit : ProcessModeEnum.Disabled;
|
_selectionChangeListener.ProcessMode = value ? ProcessModeEnum.Inherit : ProcessModeEnum.Disabled;
|
||||||
_active = value;
|
_active = value;
|
||||||
|
if(!_active && _initializationComplete)
|
||||||
|
ResetHighlight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,6 +51,7 @@ public partial class InteractionArea2D : Node2D
|
|||||||
if (_useOutline)
|
if (_useOutline)
|
||||||
{
|
{
|
||||||
_backupMaterials = _spritesToOutline.Select(s => s.Material).ToArray();
|
_backupMaterials = _spritesToOutline.Select(s => s.Material).ToArray();
|
||||||
|
_initializationComplete = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user