Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
vcmikuu committed Aug 13, 2024
1 parent 8f42be4 commit 4a4635d
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ using namespace UnityEngine::UI;
#include "HMUI/ImageView.hpp"
using namespace HMUI;

MAKE_HOOK_MATCH(UpdateValue, void) {
if(getModConfig().Active.GetValue()){
Logger.info("ImageCoverExpander Set Value True");
getModConfig().Active.SetValue(true);
} else{
Logger.info("ImageCoverExpander Set Value False");
getModConfig().Active.SetValue(false);
}
};


MAKE_HOOK_MATCH(m_DidActivate,
&GlobalNamespace::StandardLevelDetailViewController::DidActivate,
Expand All @@ -42,6 +32,13 @@ MAKE_HOOK_MATCH(m_DidActivate,

m_DidActivate(self, firstActivation, addedToHeirarchy, screenSystemEnabling);

if(getModConfig().Active.GetValue()){
Logger.info("ImageCoverExpander Set Value True");
getModConfig().Active.SetValue(true);
} else{
Logger.info("ImageCoverExpander Set Value False");
getModConfig().Active.SetValue(false);
}

if(getModConfig().Active.GetValue()){
Logger.info("ImageCoverExpander Found Value Set As True, expanding Image");
Expand Down Expand Up @@ -102,7 +99,6 @@ MOD_EXPORT_FUNC void late_load() {
Logger.info("Installing hooks...");

INSTALL_HOOK(Logger, m_DidActivate);
INSTALL_HOOK(Logger, UpdateValue);

Logger.info("Installed all hooks!");
}
Expand Down

0 comments on commit 4a4635d

Please sign in to comment.