diff --git a/src/UI/UIFactory.cs b/src/UI/UIFactory.cs index 77fe8e3..fdd441a 100644 --- a/src/UI/UIFactory.cs +++ b/src/UI/UIFactory.cs @@ -120,7 +120,7 @@ namespace UnityExplorer.UI if (!group) group = gameObject.AddComponent(); - return SetLayoutGroup(group, forceWidth, forceHeight, childControlWidth, childControlHeight, spacing, padTop, padBottom, padLeft, padRight); + return SetLayoutGroup(group, forceWidth, forceHeight, childControlWidth, childControlHeight, spacing, padTop, padBottom, padLeft, padRight, childAlignment); } /// @@ -313,51 +313,6 @@ namespace UnityExplorer.UI return button; } - ///// - ///// Create a Button and specify only the Normal color. - ///// - //public static Button CreateButton(GameObject parent, string name, string text, Action onClick = null, Color? normalColor = null) - //{ - // var colors = new ColorBlock - // { - // normalColor = normalColor ?? new Color(0.25f, 0.25f, 0.25f), - // highlightedColor = new Color(0.3f, 0.3f, 0.3f), - // pressedColor = new Color(0.15f, 0.15f, 0.15f) - // }; - - // return CreateButton(parent, name, text, onClick, colors); - //} - - ///// - ///// Create a Button and specify the entire ColorBlock for the transition values. - ///// - //public static Button CreateButton(GameObject parent, string name, string text, Action onClick, ColorBlock? colors) - //{ - // var buttonObj = CreateUIObject(name, parent); - - // Image bgImage = buttonObj.AddComponent(); - // bgImage.type = Image.Type.Sliced; - // bgImage.color = new Color(1, 1, 1, 0.75f); - - // Button button = buttonObj.AddComponent