Esempio n. 1
0
        public static void DrawInfoInCorner()
        {
            Text.Font = GameFont.Small;
            GUI.color = new Color(1f, 1f, 1f, 0.5f);
            string str = "VersionIndicator".Translate(versionString);
            string versionExtraInfo = GetVersionExtraInfo();

            if (!versionExtraInfo.NullOrEmpty())
            {
                str = str + " (" + versionExtraInfo + ")";
            }
            str = str + "\n" + "CompiledOn".Translate(buildDate.ToString("MMM d yyyy"));
            if (SteamManager.Initialized)
            {
                str = str + "\n" + "LoggedIntoSteamAs".Translate(SteamUtility.SteamPersonaName);
            }
            Rect rect = new Rect(10f, 10f, 330f, Text.CalcHeight(str, 330f));

            Widgets.Label(rect, str);
            GUI.color = Color.white;
            LatestVersionGetter component = Current.Root.gameObject.GetComponent <LatestVersionGetter>();
            Rect rect2 = new Rect(10f, rect.yMax - 5f, 330f, 999f);

            component.DrawAt(rect2);
        }
Esempio n. 2
0
        public static void DrawInfoInCorner()
        {
            Text.Font = GameFont.Small;
            GUI.color = new Color(1f, 1f, 1f, 0.5f);
            string text = "VersionIndicator".Translate(new object[]
            {
                VersionControl.versionString
            });

            if (UnityData.isDebugBuild)
            {
                text = text + " (" + "DevelopmentBuildLower".Translate() + ")";
            }
            text = text + "\n" + "CompiledOn".Translate(new object[]
            {
                VersionControl.buildDate.ToString("MMM d yyyy")
            });
            if (SteamManager.Initialized)
            {
                text = text + "\n" + "LoggedIntoSteamAs".Translate(new object[]
                {
                    SteamUtility.SteamPersonaName
                });
            }
            Rect rect = new Rect(10f, 10f, 330f, Text.CalcHeight(text, 330f));

            Widgets.Label(rect, text);
            GUI.color = Color.white;
            LatestVersionGetter component = Current.Root.gameObject.GetComponent <LatestVersionGetter>();
            Rect rect2 = new Rect(10f, rect.yMax - 5f, 330f, 999f);

            component.DrawAt(rect2);
        }