Skip to content

Commit

Permalink
Added way to enable/disable main menu overlays.
Browse files Browse the repository at this point in the history
  • Loading branch information
WesternGamer committed Oct 11, 2021
1 parent f674e00 commit 61b783d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Patches/Patch_MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ private static bool Prefix(MyGuiScreenIntroVideo ___m_backgroundScreen)
{
if (Directory.GetFiles(FileSystem.MainMenuImagesFolderPath, "*.png").Length == 0)
{


if (Directory.GetFiles(FileSystem.MainMenuImagesFolderPath, "*.dds").Length == 0)
{
if (Directory.GetFiles(FileSystem.MainMenuVideosFolderPath, "*.wmv").Length == 0)
Expand Down
9 changes: 9 additions & 0 deletions Patches/Patch_MainMenuBase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CustomScreenBackgrounds.Utill;
using CustomScreenBackgrounds.Utill.Config;
using HarmonyLib;
using Sandbox.Game.Gui;
using Sandbox.Game.Screens;
Expand All @@ -24,6 +25,14 @@ private static void Prefix(float ___m_transitionAlpha)
Rectangle destinationRectangle;
MyGuiManager.GetSafeHeightFullScreenPictureSize(MyGuiConstants.LOADING_BACKGROUND_TEXTURE_REAL_SIZE, out destinationRectangle);
MyGuiManager.DrawSpriteBatch(Image, destinationRectangle, new Color(new Vector4(1f, 1f, 1f, ___m_transitionAlpha)), true, true);
if (XMLReader.MainMenuOverlay)
{
MyGuiManager.DrawSpriteBatch("Textures\\Gui\\Screens\\screen_background_fade.dds", destinationRectangle, new Color(new Vector4(1f, 1f, 1f, ___m_transitionAlpha)), true, true);
}
if (XMLReader.MainMenuOverlay2)
{
MyGuiManager.DrawSpriteBatch("Textures\\Gui\\Screens\\main_menu_overlay.dds", destinationRectangle, new Color(new Vector4(1f, 1f, 1f, ___m_transitionAlpha)), true, true);
}
}
}
}
Expand Down
7 changes: 1 addition & 6 deletions Utill/Config/XMLReader.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml;

namespace CustomScreenBackgrounds.Utill.Config
{
Expand Down

0 comments on commit 61b783d

Please sign in to comment.