static public void AddPanel(MenuCommand menuCommand) { GameObject go = TMP_DefaultControlsEx.CreatePanel(GetStandardResources()); PlaceUIElementRoot(go, menuCommand); RectTransform rect = go.GetComponent <RectTransform>(); rect.anchoredPosition = Vector2.zero; rect.sizeDelta = Vector2.zero; }
static public void AddToggle(MenuCommand menuCommand) { GameObject go = TMP_DefaultControlsEx.CreateToggle(GetStandardResources()); // Override font size TMP_Text textComponent = go.GetComponentInChildren <TMP_Text>(); textComponent.fontSize = 24; PlaceUIElementRoot(go, menuCommand); }
static void CreateTextMeshProGuiObjectPerform(MenuCommand menuCommand) { GameObject go = TMP_DefaultControlsEx.CreateText(GetStandardResources()); // Override text color and font size TMP_Text textComponent = go.GetComponent <TMP_Text>(); textComponent.color = Color.white; //if (textComponent.m_isWaitingOnResourceLoad == false) // textComponent.fontSize = TMP_Settings.defaultFontSize; PlaceUIElementRoot(go, menuCommand); }
static public void CreateImage(MenuCommand menuCommand) { GameObject go = TMP_DefaultControlsEx.CreateImage(GetStandardResources()); PlaceUIElementRoot(go, menuCommand); }
static void AddTextMeshProInputField(MenuCommand menuCommand) { GameObject go = TMP_DefaultControlsEx.CreateInputField(GetStandardResources()); PlaceUIElementRoot(go, menuCommand); }