-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
752dc28
commit 3c2fc51
Showing
6 changed files
with
45 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include "beatsaber-hook/shared/utils/logging.hpp" | ||
|
||
/// @brief A logger, useful for printing debug messages | ||
/// @return | ||
inline constexpr auto Logger = Paper::ConstLoggerContext(MOD_ID "_" VERSION); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#pragma once | ||
|
||
#include "scotland2/shared/loader.hpp" | ||
|
||
/// @brief Stores the ID and version of our mod, and is sent to the modloader upon startup | ||
inline const modloader::ModInfo modInfo{MOD_ID, VERSION, 0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
#include "main.hpp" | ||
#include "autohooks.hpp" | ||
#include "AutoHooks.hpp" | ||
#include "Logger.hpp" | ||
|
||
// GlobalNamespace | ||
#include "GlobalNamespace/MainMenuViewController.hpp" | ||
|
||
// UnityEngine | ||
#include "UnityEngine/GameObject.hpp" | ||
|
||
using namespace GlobalNamespace; | ||
namespace Hooks { | ||
// Usings | ||
using namespace GlobalNamespace; | ||
|
||
// Hooks the MainMenuViewController to hide the musicPackPromoBanner object. | ||
MAKE_AUTO_HOOK_MATCH(MainMenuViewController_DidActivate, &MainMenuViewController::DidActivate, void, MainMenuViewController* self, bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling) { | ||
Logger.debug("MainMenuViewController_DidActivate"); | ||
self->____musicPackPromoBanner->get_gameObject()->SetActive(false); | ||
MainMenuViewController_DidActivate(self, firstActivation, addedToHierarchy, screenSystemEnabling); | ||
// Hooks the MainMenuViewController to hide the musicPackPromoBanner object. | ||
MAKE_AUTO_HOOK_MATCH(MainMenuViewController_DidActivate, &MainMenuViewController::DidActivate, void, MainMenuViewController* self, bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling) { | ||
Logger.debug("MainMenuViewController_DidActivate"); | ||
self->____musicPackPromoBanner->get_gameObject()->SetActive(false); | ||
MainMenuViewController_DidActivate(self, firstActivation, addedToHierarchy, screenSystemEnabling); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters