This commit is contained in:
SoulliesOfficial
2026-03-28 06:30:33 -04:00
parent 11423add8f
commit 7533e7031d
20 changed files with 20605 additions and 18964 deletions

View File

@@ -61,5 +61,15 @@ namespace Ichni.Editor
subcontainer.dynamicUIElements.Add(button);
return button;
}
public DynamicUIToggle GenerateToggle(DynamicUISubcontainer subcontainer, string title, bool defaultState = false)
{
DynamicUIToggle toggle = Instantiate(EditorManager.instance.basePrefabs.toggle, subcontainer.rect)
.GetComponent<DynamicUIToggle>();
toggle.Initialize(null, title, string.Empty);
toggle.toggle.isOn = defaultState;
subcontainer.dynamicUIElements.Add(toggle);
return toggle;
}
}
}