Example #1
0
        static public void AddButton(MenuCommand menuCommand)
        {
            GameObject go = RubyTMP_DefaultControls.CreateButton(GetStandardResources());

            // Override font size
            TMP_Text textComponent = go.GetComponentInChildren <TMP_Text>();

            textComponent.fontSize = 24;

            PlaceUIElementRoot(go, menuCommand);
        }
Example #2
0
        static void CreateTextMeshProGuiObjectPerform(MenuCommand menuCommand)
        {
            GameObject go = RubyTMP_DefaultControls.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);
        }