public void BuildMenuSection(IGuiMenuBuilder menuBuilder) { menuBuilder.StartSection(); menuBuilder.AddCommand(commands.Move); menuBuilder.AddCommand(commands.Rotate); menuBuilder.AddCommand(commands.Scale); }
// GUI public void BuildMenuSection(IGuiMenuBuilder menuBuilder) { foreach (var command in guiCommandBlock) { menuBuilder.AddCommand(command); } }
public void BuildMenuSection(IGuiMenuBuilder menuBuilder) { if (AppModeService.Mode != AppMode.Editing) { return; } var node = Node; if (node.HasComponent <ITransformable3DComponent>()) { menuBuilder.StartSection(); menuBuilder.AddCommand(commands.Move); menuBuilder.AddCommand(commands.Move3D); menuBuilder.AddCommand(commands.Rotate); menuBuilder.AddCommand(commands.Scale); } if (node.HasComponent <IFocusNodeComponent>()) { menuBuilder.StartSection(); menuBuilder.AddCommand(commands.FocusView); } if (node.HasComponent <IRichTextComponent>()) { menuBuilder.StartSection(); menuBuilder.AddCommand(commands.SetBorderCurve); } var cCopyPaste = node.SearchComponent <ICopyPasteComponent>(); if (cCopyPaste != null) { menuBuilder.StartSection(); // todo: return enabled/disabled when the context menu can be changed without deselection menuBuilder.AddCommand(commands.Cut); menuBuilder.AddCommand(commands.Copy); menuBuilder.AddCommand(commands.Duplicate); menuBuilder.AddCommand(commands.Paste); menuBuilder.AddCommand(commands.Delete); menuBuilder.StartSection(); // todo: top, bottom menuBuilder.AddCommand(commands.MoveUp); menuBuilder.AddCommand(commands.MoveDown); } if (node.HasComponent <ITransformable3DComponent>()) { menuBuilder.StartSection(); menuBuilder.AddCommand(commands.MakeScenePortal); } }