@@ -120,7 +120,7 @@ public static T SetLayoutGroup<T>(GameObject gameObject, bool? forceWidth = null
120
120
if ( ! group )
121
121
group = gameObject . AddComponent < T > ( ) ;
122
122
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 ) ;
124
124
}
125
125
126
126
/// <summary>
@@ -313,51 +313,6 @@ public static Button CreateButton(GameObject parent, string name, string text, A
313
313
return button ;
314
314
}
315
315
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
-
361
316
/// <summary>
362
317
/// Create a Slider control.
363
318
/// </summary>
0 commit comments