Close ColorSelector on portchange

This commit is contained in:
Tim
2025-07-08 00:20:54 +02:00
parent f1dc79484a
commit 372ec517e8
2 changed files with 4 additions and 1 deletions

View File

@@ -26490,6 +26490,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
cms: {fileID: 89481405}
marker: {fileID: 755573186}
ColorSelector: {fileID: 1728979212}
--- !u!222 &1541654566
CanvasRenderer:
m_ObjectHideFlags: 0

View File

@@ -8,6 +8,7 @@ public class PortSelectorButton : MonoBehaviour
public ChildModelSelector cms;
public GameObject marker;
public Action RemoveOtherMarkers;
public ColorSelector ColorSelector;
public string PortID { get; set; }
public int PortIndex { set; get; }
@@ -17,7 +18,8 @@ public class PortSelectorButton : MonoBehaviour
}
void OnClick()
{
Debug.Log($"Opening CMS on {this}");
Debug.Log($"Changing Port to {this}");
ColorSelector.ResetThis();
cms.PortID = PortID;
cms.PortIndex = PortIndex;
cms.AssignButtons(); // rebuilds GUI