更新
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user