private void RebuildDetails() { CustomDetailRoot.Clear(); DefaultLabel.Clear(); var bifurcationsProp = CommandItem.CommandProperty.GetChildProperty("bifurcations"); var count = bifurcationsProp.GetProperty().arraySize; for (int i = 0; i < count; i++) { var bifurcationBox = new VisualElement(); var item = bifurcationsProp.GetArrayElementAt(i); var labelProp = item.GetChildProperty("label").GetProperty(); var a = new Foldout(); a.text = $"「{labelProp.stringValue}」"; // new Label($"「{labelProp.stringValue}」"); var toggle = a.Q <Toggle>(); toggle.style.marginBottom = 0f; a.style.marginTop = 10f; toggle.style.backgroundColor = new Color(0, 0, 0, 0.5f); bifurcationBox.Add(a); DefaultLabel.Add(a); var l = new CommandListView(CommandItem.ParentList, item.GetChildProperty("commandList.commands")); a.Add(l); CustomDetailRoot.Add(bifurcationBox); } }
private void BuildNestedCommandList() { var commandProp = CommandItem.CommandProperty; var nestedCommandProp = commandProp.GetChildProperty("commandList.commands"); CustomDetailRoot.Clear(); var commandListView = new CommandListView(CommandItem.ParentList, nestedCommandProp); CustomDetailRoot.Add(commandListView); }
public override void OnCreated() { CustomDetailRoot.Clear(); var commandProp = CommandItem.CommandProperty; var containerProp = commandProp.GetChildProperty("container.commands"); var containerListView = new CommandListView(CommandItem.ParentList, containerProp); CustomDetailRoot.Add(containerListView); }
public override void OnCreated() { CustomDetailRoot.Clear(); var l0 = new Label("ルーチン"); CustomDetailRoot.Add(l0); var commandProp = CommandItem.CommandProperty; var trueProp = commandProp.GetChildProperty("routine.commands"); var trueListView = new CommandListView(CommandItem.ParentList, trueProp); CustomDetailRoot.Add(trueListView); }
public override void OnCreated() { CustomDetailRoot.Clear(); var l0 = new Label("真の場合"); CustomDetailRoot.Add(l0); var commandProp = CommandItem.CommandProperty; var trueProp = commandProp.GetChildProperty("ifTrue.commands"); var trueListView = new CommandListView(CommandItem.ParentList, trueProp); CustomDetailRoot.Add(trueListView); var l1 = new Label("偽の場合"); CustomDetailRoot.Add(l1); var falseProp = commandProp.GetChildProperty("ifFalse.commands"); var falseListView = new CommandListView(CommandItem.ParentList, falseProp); CustomDetailRoot.Add(falseListView); }