示例#1
0
        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;
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        static public void CreateImage(MenuCommand menuCommand)
        {
            GameObject go = TMP_DefaultControlsEx.CreateImage(GetStandardResources());

            PlaceUIElementRoot(go, menuCommand);
        }
示例#5
0
        static void AddTextMeshProInputField(MenuCommand menuCommand)
        {
            GameObject go = TMP_DefaultControlsEx.CreateInputField(GetStandardResources());

            PlaceUIElementRoot(go, menuCommand);
        }