Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 7a872ce

Browse files
committed
Update UIFactory.cs
1 parent b2cbdc1 commit 7a872ce

File tree

1 file changed

+1
-46
lines changed

1 file changed

+1
-46
lines changed

src/UI/UIFactory.cs

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static T SetLayoutGroup<T>(GameObject gameObject, bool? forceWidth = null
120120
if (!group)
121121
group = gameObject.AddComponent<T>();
122122

123-
return SetLayoutGroup(group, forceWidth, forceHeight, childControlWidth, childControlHeight, spacing, padTop, padBottom, padLeft, padRight);
123+
return SetLayoutGroup(group, forceWidth, forceHeight, childControlWidth, childControlHeight, spacing, padTop, padBottom, padLeft, padRight, childAlignment);
124124
}
125125

126126
/// <summary>
@@ -313,51 +313,6 @@ public static Button CreateButton(GameObject parent, string name, string text, A
313313
return button;
314314
}
315315

316-
///// <summary>
317-
///// Create a Button and specify only the Normal color.
318-
///// </summary>
319-
//public static Button CreateButton(GameObject parent, string name, string text, Action onClick = null, Color? normalColor = null)
320-
//{
321-
// var colors = new ColorBlock
322-
// {
323-
// normalColor = normalColor ?? new Color(0.25f, 0.25f, 0.25f),
324-
// highlightedColor = new Color(0.3f, 0.3f, 0.3f),
325-
// pressedColor = new Color(0.15f, 0.15f, 0.15f)
326-
// };
327-
328-
// return CreateButton(parent, name, text, onClick, colors);
329-
//}
330-
331-
///// <summary>
332-
///// Create a Button and specify the entire ColorBlock for the transition values.
333-
///// </summary>
334-
//public static Button CreateButton(GameObject parent, string name, string text, Action onClick, ColorBlock? colors)
335-
//{
336-
// var buttonObj = CreateUIObject(name, parent);
337-
338-
// Image bgImage = buttonObj.AddComponent<Image>();
339-
// bgImage.type = Image.Type.Sliced;
340-
// bgImage.color = new Color(1, 1, 1, 0.75f);
341-
342-
// Button button = buttonObj.AddComponent<Button>();
343-
// SetDefaultSelectableColors(button);
344-
345-
// if (onClick != null)
346-
// button.onClick.AddListener(onClick);
347-
348-
// if (colors != null)
349-
// button.colors = (ColorBlock)colors;
350-
351-
// var textObj = CreateLabel(buttonObj, "Text", text, TextAnchor.MiddleCenter);
352-
353-
// RectTransform rect = textObj.GetComponent<RectTransform>();
354-
// rect.anchorMin = Vector2.zero;
355-
// rect.anchorMax = Vector2.one;
356-
// rect.sizeDelta = Vector2.zero;
357-
358-
// return button;
359-
//}
360-
361316
/// <summary>
362317
/// Create a Slider control.
363318
/// </summary>

0 commit comments

Comments
 (0)