static public void AddPanel(MenuCommand menuCommand) { GameObject go = MyDefaultControls.CreatePanel(GetStandardResources()); PlaceUIElementRoot(go, menuCommand); // Panel is special, we need to ensure there's no padding after repositioning. RectTransform rect = go.GetComponent <RectTransform>(); rect.anchoredPosition = Vector2.zero; rect.sizeDelta = Vector2.zero; }
static public void AddScrollView(MenuCommand menuCommand) { GameObject go = MyDefaultControls.CreateScrollView(GetStandardResources()); PlaceUIElementRoot(go, menuCommand); }
public static void AddInputField(MenuCommand menuCommand) { GameObject go = MyDefaultControls.CreateInputField(GetStandardResources()); PlaceUIElementRoot(go, menuCommand); }