public void AddCommand(ToolbarItem command) { var cmd = command; if (cmd == null || cmd.Position == ToolbarPosition.Right) { RightCommands.Add(command); } else if (cmd.Position == ToolbarPosition.BottomLeft) { BottomLeftCommands.Add(command); } else if (cmd.Position == ToolbarPosition.BottomRight) { BottomRightCommands.Add(command); } else { LeftCommands.Add(command); } }
public override void GoBottom() { base.GoBottom(); GUILayout.BeginHorizontal(EditorStyles.toolbar); //var scale = GUILayout.HorizontalSlider(ElementDesignerStyles.Scale, 0.8f, 1f, GUILayout.Width(200f)); //if (scale != ElementDesignerStyles.Scale) //{ // ElementDesignerStyles.Scale = scale; // InvertGraphEditor.ExecuteCommand(new ScaleCommand() { Scale = scale }); //} foreach (var editorCommand in BottomLeftCommands.OrderBy(p => p.Order)) { DoCommand(editorCommand); } GUILayout.FlexibleSpace(); foreach (var editorCommand in BottomRightCommands.OrderBy(p => p.Order)) { DoCommand(editorCommand); } GUILayout.EndHorizontal(); }