Beispiel #1
0
 private void Main_DrawMenu1(On.Terraria.Main.orig_DrawMenu orig, Main self, GameTime gameTime)
 {
     orig.Invoke(self, gameTime);
     Main.dayTime = true;
     Main.time    = 27000;
     Main.LogoA   = 255;
     Main.LogoB   = 0;
     UpdateOurLogo();
     UpdateOurIcon();
 }
        private void Main_DrawMenu(On.Terraria.Main.orig_DrawMenu orig, Main self, GameTime gameTime)
        {
            var sb = Main.spriteBatch;

            if (TextureExists("Pictures/fascismflag") && myTextures[TextureID.FascistFlag] != null)
            {
                sb.Draw(myTextures[TextureID.FascistFlag], new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.White);
            }

            orig(self, gameTime);
        }
Beispiel #3
0
        private void Main_DrawMenu(On.Terraria.Main.orig_DrawMenu orig, Main self, GameTime gameTime)
        {
            HookPreDrawMenu();

            if (MenuInterface?.CurrentState != null && lastUpdateUIGameTime != null)
            {
                MenuInterface.Draw(Main.spriteBatch, lastUpdateUIGameTime);
            }

            try
            {
                orig(self, gameTime);
            }
            catch (Exception) { }

            HookPostDrawMenu();
        }
Beispiel #4
0
        private void Main_DrawMenu(On.Terraria.Main.orig_DrawMenu orig, Main self, GameTime gameTime)
        {
            AmbienceHandler.StopAllAmbientSounds();
            MenuHelper.DrawSlenderMenuUI505();
            MenuHelper.DrawChangeLogs();

            if (volRaisedNotifTimer >= 0)
            {
                ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontDeathText, "Volume Adjusted Automatically.", new Vector2(Main.screenWidth / 2, Main.screenHeight - 10), Color.Gray * volRaisedNotifTimer, 0f, Main.fontDeathText.MeasureString("Volume Adjusted Automatically.") / 2, new Vector2(0.3f, 0.3f));
            }
            if (Main.menuMode == SlenderMenuModeID.SlenderExtras)
            {
                MenuHelper.DrawSocials();
            }
            volRaisedNotifTimer--;
            orig(self, gameTime);
        }
 private void Main_DrawMenu(On.Terraria.Main.orig_DrawMenu orig, Main self, GameTime gameTime)
 {
     orig(self, gameTime);
     Main.spriteBatch.Begin();
     if (FailedToSendLogs & drawLogFailMessageTimer < 360)
     {
         drawLogFailMessageTimer++;
         Main.spriteBatch.DrawString(Main.fontMouseText, "Failed to upload logs\nClick here to try again", new Vector2(25, 10), Color.Cyan);
         Vector2   stringPixelSize = Main.fontMouseText.MeasureString("Failed to upload logs\nClick here to try again");
         Rectangle rect            = new Rectangle(25, 10, (int)stringPixelSize.X, (int)stringPixelSize.Y);
         if (rect.Contains(Main.MouseScreen.ToPoint()) && Main.mouseLeft)
         {
             UploadLogs(0);
             FailedToSendLogs = false;
         }
     }
     Main.spriteBatch.DrawString(Main.fontMouseText, Main.menuMode.ToString(), new Vector2(10, 10), Color.Cyan);
     Main.spriteBatch.End();
 }
        private void Main_DrawMenu(On.Terraria.Main.orig_DrawMenu orig, Main self, GameTime gameTime)
        {
            ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontDeathText, $"{DiscordInfo.userName}", new Vector2(Main.screenWidth / 2, Main.screenHeight - 8), Color.LightGray, 0f, Main.fontDeathText.MeasureString("Added a world to your worlds!") / 2, new Vector2(0.275f, 0.275f));
            UIHelper.ClickHandling();
            if (Main.menuMode == MenuModeID.HowToPlay)
            {
                MenuHelper.DrawHTP();
            }

            fileAddedNoticeTimer--;
            if (fileAddedNoticeTimer >= 0)
            {
                ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontDeathText, "Added a world to your worlds!", new Vector2(Main.screenWidth / 2, Main.screenHeight - 8), Color.LightGray, 0f, Main.fontDeathText.MeasureString("Added a world to your worlds!") / 2, new Vector2(0.275f, 0.275f));
            }

            // UIHelper.CreateSimpleUIButton(Main.fontDeathText, new Vector2(300, 100), $"{Environment.OSVersion.Platform} {Environment.OSVersion.Version}", null, ref scaleTimer_BasedOnSineWave);
            if (Main.menuMode == 0)
            {
                ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontDeathText, $"Authenticated as: {SteamUser.GetSteamID().GetAccountID()} ({SteamFriends.GetPersonaName()})", new Vector2(6, 6), Color.LightGray, 0f, Vector2.Zero, new Vector2(0.275f, 0.275f));
            }
            MenuHelper.DrawUserStatistics();
            AmbienceHandler.StopAllAmbientSounds();
            MenuHelper.DrawSlenderMenuUI();
            MenuHelper.DrawChangeLogs();

            if (volRaisedNotifTimer >= 0)
            {
                ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, Main.fontDeathText, "Volume Adjusted Automatically.", new Vector2(Main.screenWidth / 2, Main.screenHeight - 10), Color.Gray * volRaisedNotifTimer, 0f, Main.fontDeathText.MeasureString("Volume Adjusted Automatically.") / 2, new Vector2(0.3f, 0.3f));
            }

            if (Main.menuMode == MenuModeID.SlenderExtras)
            {
                MenuHelper.DrawSocials();
            }

            volRaisedNotifTimer--;
            SpookyTerrariaUtils.HandleKeyboardInputs();
            SpookyTerrariaUtils.oldKeyboardState = SpookyTerrariaUtils.newKeyboardState;
            UIHelper.MSOld = UIHelper.MSNew;
            orig(self, gameTime);
        }
Beispiel #7
0
        private void Draw(On.Terraria.Main.orig_DrawMenu orig, Main self, GameTime gameTime)
        {
            orig(self, gameTime);

            OnDraw(Main.spriteBatch);
        }