Added initial pheromone smell

This commit is contained in:
Pascal Serrarens 2026-02-04 12:52:56 +01:00
parent 08f9f3a3b1
commit 5982c8acfe

View File

@ -492,7 +492,20 @@ public class ClusterInspector : Editor {
if (this.currentNucleus == null)
return;
this.currentNucleus.name = EditorGUILayout.TextField(this.currentNucleus.GetType().ToString(), this.currentNucleus.name);
GUIStyle headerStyle = new GUIStyle(EditorStyles.boldLabel) {
alignment = TextAnchor.MiddleLeft,
margin = new RectOffset(10, 0, 4, 4)
};
//GUI.backgroundColor = EditorGUIUtility.isProSkin ? new Color(0.15f, 0.15f, 0.15f) : new Color(0.85f, 0.85f, 0.85f);
//GUILayout.BeginVertical("box");
GUIStyle boldTextFieldStyle = new GUIStyle(EditorStyles.textField) {
fontStyle = FontStyle.Bold
};
GUILayout.Label(this.currentNucleus.GetType().ToString(), headerStyle);
//GUILayout.EndVertical();
//GUI.backgroundColor = Color.white; // Reset background color
this.currentNucleus.name = EditorGUILayout.TextField(this.currentNucleus.name, boldTextFieldStyle);
if (this.currentNucleus is Neuron neuroid) {
if (this.currentNucleus is MemoryCell memory) {
}
@ -554,18 +567,18 @@ public class ClusterInspector : Editor {
ConnectNucleus(this.cluster, this.currentNucleus);
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("Add Input"))
AddInput(selectedInputType, this.currentNucleus);
string[] options = { "Neuron", "MemoryCell", "Selector", "Cluster" };
selectedInputType = EditorGUILayout.Popup(selectedInputType, options);
if (GUILayout.Button("Add Input"))
AddInput(selectedInputType, this.currentNucleus);
EditorGUILayout.EndHorizontal();
if (GUILayout.Button("Add Input Neuron"))
AddInputNeuron(this.currentNucleus);
if (GUILayout.Button("Add Input MemoryCell"))
AddInputMemoryCell(this.currentNucleus);
if (GUILayout.Button("Add Input Cluster"))
AddCluster(this.currentNucleus);
// if (GUILayout.Button("Add Input Neuron"))
// AddInputNeuron(this.currentNucleus);
// if (GUILayout.Button("Add Input MemoryCell"))
// AddInputMemoryCell(this.currentNucleus);
// if (GUILayout.Button("Add Input Cluster"))
// AddCluster(this.currentNucleus);
EditorGUILayout.Space();
@ -599,17 +612,17 @@ public class ClusterInspector : Editor {
protected virtual void AddInput(int selectedInputType, INucleus nucleus) {
switch (selectedInputType) {
case 0: // Neuron
AddInputNeuron(nucleus);
break;
AddInputNeuron(nucleus);
break;
case 1: // MemoryCell
AddInputMemoryCell(nucleus);
break;
AddInputMemoryCell(nucleus);
break;
case 2: // Selector
AddSelectorInput(nucleus);
break;
AddSelectorInput(nucleus);
break;
case 3: // Cluster
AddCluster(nucleus);
break;
AddCluster(nucleus);
break;
}
}