Exemple #1
0
        public void UpdatePrivate(bool show = false)
        {
            if (FontSize != _panel.GetValueFloat("FontSize"))
            {
                _panel.SetValueFloat("FontSize", FontSize);
            }

            // no need to update if the text has not changed.
            if (_panel.GetPrivateText() != _privateString.ToString())
            {
                _panel.WritePrivateText(_privateString.ToString());

                if (show)
                {
                    if (ForceRedraw)
                    {
                        _panel.ShowTextureOnScreen();
                    }
                    _panel.ShowPrivateTextOnScreen();
                }
            }
        }