public static void MainMenuOnGUI()
        {
            VersionControl.DrawInfoInCorner();
            float   num       = (float)(UI.screenWidth / 2);
            Vector2 paneSize  = MainMenuDrawer.PaneSize;
            double  x         = num - paneSize.x / 2.0;
            float   num2      = (float)(UI.screenHeight / 2);
            Vector2 paneSize2 = MainMenuDrawer.PaneSize;
            double  y         = num2 - paneSize2.y / 2.0 + 50.0;
            Vector2 paneSize3 = MainMenuDrawer.PaneSize;
            float   x2        = paneSize3.x;
            Vector2 paneSize4 = MainMenuDrawer.PaneSize;
            Rect    rect      = new Rect((float)x, (float)y, x2, paneSize4.y);

            rect.x = (float)((float)UI.screenWidth - rect.width - 30.0);
            Rect rect2 = new Rect(0f, (float)(rect.y - 30.0), (float)((float)UI.screenWidth - 85.0), 30f);

            Text.Font   = GameFont.Medium;
            Text.Anchor = TextAnchor.UpperRight;
            string text = "MainPageCredit".Translate();

            if (UI.screenWidth < 990)
            {
                Rect    position = rect2;
                float   xMax     = position.xMax;
                Vector2 vector   = Text.CalcSize(text);
                position.xMin  = xMax - vector.x;
                position.xMin -= 4f;
                position.xMax += 4f;
                GUI.color      = new Color(0.2f, 0.2f, 0.2f, 0.5f);
                GUI.DrawTexture(position, BaseContent.WhiteTex);
                GUI.color = Color.white;
            }
            Widgets.Label(rect2, text);
            Text.Anchor = TextAnchor.UpperLeft;
            Text.Font   = GameFont.Small;
            Vector2 a = MainMenuDrawer.TitleSize;

            if (a.x > (float)UI.screenWidth)
            {
                a *= (float)UI.screenWidth / a.x;
            }
            a *= 0.7f;
            Rect position2 = new Rect((float)((float)UI.screenWidth - a.x - 50.0), rect2.y - a.y, a.x, a.y);

            GUI.DrawTexture(position2, MainMenuDrawer.TexTitle, ScaleMode.StretchToFill, true);
            GUI.color = new Color(1f, 1f, 1f, 0.5f);
            float   num3            = (float)(UI.screenWidth - 8);
            Vector2 ludeonLogoSize  = MainMenuDrawer.LudeonLogoSize;
            float   x3              = num3 - ludeonLogoSize.x;
            Vector2 ludeonLogoSize2 = MainMenuDrawer.LudeonLogoSize;
            float   x4              = ludeonLogoSize2.x;
            Vector2 ludeonLogoSize3 = MainMenuDrawer.LudeonLogoSize;
            Rect    position3       = new Rect(x3, 8f, x4, ludeonLogoSize3.y);

            GUI.DrawTexture(position3, MainMenuDrawer.TexLudeonLogo, ScaleMode.StretchToFill, true);
            GUI.color  = Color.white;
            rect.yMin += 17f;
            MainMenuDrawer.DoMainMenuControls(rect, MainMenuDrawer.anyMapFiles);
        }
        public static void MainMenuOnGUI()
        {
            VersionControl.DrawInfoInCorner();
            Rect rect = new Rect((float)(UI.screenWidth / 2) - MainMenuDrawer.PaneSize.x / 2f, (float)(UI.screenHeight / 2) - MainMenuDrawer.PaneSize.y / 2f + 50f, MainMenuDrawer.PaneSize.x, MainMenuDrawer.PaneSize.y);

            rect.x = (float)UI.screenWidth - rect.width - 30f;
            Rect rect2 = new Rect(0f, rect.y - 30f, (float)UI.screenWidth - 85f, 30f);

            Text.Font   = GameFont.Medium;
            Text.Anchor = TextAnchor.UpperRight;
            string text = "MainPageCredit".Translate();

            if (UI.screenWidth < 990)
            {
                Rect position = rect2;
                position.xMin  = position.xMax - Text.CalcSize(text).x;
                position.xMin -= 4f;
                position.xMax += 4f;
                GUI.color      = new Color(0.2f, 0.2f, 0.2f, 0.5f);
                GUI.DrawTexture(position, BaseContent.WhiteTex);
                GUI.color = Color.white;
            }
            Widgets.Label(rect2, text);
            Text.Anchor = TextAnchor.UpperLeft;
            Text.Font   = GameFont.Small;
            Vector2 a = MainMenuDrawer.TitleSize;

            if (a.x > (float)UI.screenWidth)
            {
                a *= (float)UI.screenWidth / a.x;
            }
            a *= 0.7f;
            Rect position2 = new Rect((float)UI.screenWidth - a.x - 50f, rect2.y - a.y, a.x, a.y);

            GUI.DrawTexture(position2, MainMenuDrawer.TexTitle, ScaleMode.StretchToFill, true);
            GUI.color = new Color(1f, 1f, 1f, 0.5f);
            Rect position3 = new Rect((float)(UI.screenWidth - 8) - MainMenuDrawer.LudeonLogoSize.x, 8f, MainMenuDrawer.LudeonLogoSize.x, MainMenuDrawer.LudeonLogoSize.y);

            GUI.DrawTexture(position3, MainMenuDrawer.TexLudeonLogo, ScaleMode.StretchToFill, true);
            GUI.color  = Color.white;
            rect.yMin += 17f;
            MainMenuDrawer.DoMainMenuControls(rect, MainMenuDrawer.anyMapFiles);
            if (Debug.isDebugBuild)
            {
                Rect outRect = new Rect(rect.x - 310f, rect.y, 295f, 400f);
                MainMenuDrawer.DoDevBuildWarningRect(outRect);
            }
            Rect outRect2 = new Rect(8f, (float)(UI.screenHeight - 8 - 400), 240f, 400f);

            MainMenuDrawer.DoTranslationInfoRect(outRect2);
        }
Beispiel #3
0
        public static void MainMenuOnGUI()
        {
            VersionControl.DrawInfoInCorner();
            Rect rect = new Rect((float)(UI.screenWidth / 2) - PaneSize.x / 2f, (float)(UI.screenHeight / 2) - PaneSize.y / 2f + 50f, PaneSize.x, PaneSize.y);

            rect.x = (float)UI.screenWidth - rect.width - 30f;
            Rect rect2 = new Rect(0f, rect.y - 30f, (float)UI.screenWidth - 85f, 30f);

            Text.Font   = GameFont.Medium;
            Text.Anchor = TextAnchor.UpperRight;
            string text = "MainPageCredit".Translate();

            if (UI.screenWidth < 990)
            {
                Rect position = rect2;
                position.xMin  = position.xMax - Text.CalcSize(text).x;
                position.xMin -= 4f;
                position.xMax += 4f;
                GUI.color      = new Color(0.2f, 0.2f, 0.2f, 0.5f);
                GUI.DrawTexture(position, BaseContent.WhiteTex);
                GUI.color = Color.white;
            }
            Widgets.Label(rect2, text);
            Text.Anchor = TextAnchor.UpperLeft;
            Text.Font   = GameFont.Small;
            Vector2 titleSize = TitleSize;

            if (titleSize.x > (float)UI.screenWidth)
            {
                titleSize *= (float)UI.screenWidth / titleSize.x;
            }
            titleSize *= 0.5f;
            GUI.DrawTexture(new Rect((float)UI.screenWidth - titleSize.x - 50f, rect2.y - titleSize.y, titleSize.x, titleSize.y), TexTitle, ScaleMode.StretchToFill, alphaBlend: true);
            GUI.color = new Color(1f, 1f, 1f, 0.5f);
            GUI.DrawTexture(new Rect((float)(UI.screenWidth - 8) - LudeonLogoSize.x, 8f, LudeonLogoSize.x, LudeonLogoSize.y), TexLudeonLogo, ScaleMode.StretchToFill, alphaBlend: true);
            GUI.color  = Color.white;
            rect.yMin += 17f;
            DoMainMenuControls(rect, anyMapFiles);
            DoTranslationInfoRect(new Rect(8f, 100f, 300f, 400f));
            DoExpansionIcons();
        }
Beispiel #4
0
 public override void ExtraOnGUI()
 {
     base.ExtraOnGUI();
     VersionControl.DrawInfoInCorner();
 }
Beispiel #5
0
        public static void MainMenuOnGUI()
        {
            VersionControl.DrawInfoInCorner();
            float   num       = (float)(UI.screenWidth / 2);
            Vector2 paneSize  = PaneSize;
            float   x         = num - paneSize.x / 2f;
            float   num2      = (float)(UI.screenHeight / 2);
            Vector2 paneSize2 = PaneSize;
            float   y         = num2 - paneSize2.y / 2f + 50f;
            Vector2 paneSize3 = PaneSize;
            float   x2        = paneSize3.x;
            Vector2 paneSize4 = PaneSize;
            Rect    rect      = new Rect(x, y, x2, paneSize4.y);

            rect.x = (float)UI.screenWidth - rect.width - 30f;
            Rect rect2 = new Rect(0f, rect.y - 30f, (float)UI.screenWidth - 85f, 30f);

            Text.Font   = GameFont.Medium;
            Text.Anchor = TextAnchor.UpperRight;
            string text = "MainPageCredit".Translate();

            if (UI.screenWidth < 990)
            {
                Rect    position = rect2;
                float   xMax     = position.xMax;
                Vector2 vector   = Text.CalcSize(text);
                position.xMin  = xMax - vector.x;
                position.xMin -= 4f;
                position.xMax += 4f;
                GUI.color      = new Color(0.2f, 0.2f, 0.2f, 0.5f);
                GUI.DrawTexture(position, BaseContent.WhiteTex);
                GUI.color = Color.white;
            }
            Widgets.Label(rect2, text);
            Text.Anchor = TextAnchor.UpperLeft;
            Text.Font   = GameFont.Small;
            Vector2 a = TitleSize;

            if (a.x > (float)UI.screenWidth)
            {
                a *= (float)UI.screenWidth / a.x;
            }
            a *= 0.7f;
            Rect position2 = new Rect((float)UI.screenWidth - a.x - 50f, rect2.y - a.y, a.x, a.y);

            GUI.DrawTexture(position2, TexTitle, ScaleMode.StretchToFill, alphaBlend: true);
            GUI.color = new Color(1f, 1f, 1f, 0.5f);
            float   num3            = (float)(UI.screenWidth - 8);
            Vector2 ludeonLogoSize  = LudeonLogoSize;
            float   x3              = num3 - ludeonLogoSize.x;
            Vector2 ludeonLogoSize2 = LudeonLogoSize;
            float   x4              = ludeonLogoSize2.x;
            Vector2 ludeonLogoSize3 = LudeonLogoSize;
            Rect    position3       = new Rect(x3, 8f, x4, ludeonLogoSize3.y);

            GUI.DrawTexture(position3, TexLudeonLogo, ScaleMode.StretchToFill, alphaBlend: true);
            GUI.color  = Color.white;
            rect.yMin += 17f;
            DoMainMenuControls(rect, anyMapFiles);
            if (Debug.isDebugBuild)
            {
                Rect outRect = new Rect(rect.x - 310f, rect.y, 295f, 400f);
                DoDevBuildWarningRect(outRect);
            }
            Rect outRect2 = new Rect(8f, (float)(UI.screenHeight - 8 - 400), 240f, 400f);

            DoTranslationInfoRect(outRect2);
        }