consolation icon indicating copy to clipboard operation
consolation copied to clipboard

Suggestion: scale font size if shakeToOpen

Open jelling opened this issue 5 years ago • 1 comments

The text size was unreadable on my iPhone so I added a scaling factor, implicitly for iOS as I hope no one is shaking their laptops:

        void Start()
        {
            if (openOnStart)
            {
                isVisible = true;
            }

            // new line 
            logFontSize = shakeToOpen ? logFontSize * 3 : logFontSize;
        }

A small thing but could be helpful for new users.

jelling avatar Feb 01 '21 16:02 jelling

We definitely need to get a better handle on UI scaling on different devices. I'm hesitant to use shakeToOpen to implicitly check for mobile builds, but I'll keep this open until we have a general solution.

mminer avatar Feb 04 '21 02:02 mminer

In 905666d I made the Console class properties public so that they can be modified outside the component. This way you can write something like this to change the scale factor on iOS:

void Awake()
{
    var console = GetComponent<Console>();

    if (Application.platform == RuntimePlatform.IPhonePlayer)
    {
        console.logFontSize *= 30;
    }
}

mminer avatar Jul 14 '23 22:07 mminer