Skip to content

Commit

Permalink
disable color option
Browse files Browse the repository at this point in the history
  • Loading branch information
shad0wshayd3 committed Dec 5, 2023
1 parent 478d7b9 commit e252713
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.22)
set(NAME "BakaPowerArmorHUD")
set(VERSION 1.0.0)
set(VERSION 1.1.0)

# ---- Options ----

Expand Down
15 changes: 15 additions & 0 deletions src/c++/Hooks/Hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ class Hooks
return _SetPowerArmorMode(a_inPowerArmor);
}

if (MCM::Settings::General::bDisableColor)
{
return;
}

detail::Notify<RE::ColorUpdateEvent>();
}

Expand Down Expand Up @@ -173,6 +178,11 @@ class Hooks
return _QActorInPowerArmor(a_actor);
}

if (MCM::Settings::General::bDisableColor)
{
return _QActorInPowerArmor(a_actor);
}

if (!MCM::Settings::General::bDisablePAColor)
{
return _QActorInPowerArmor(a_actor);
Expand Down Expand Up @@ -240,6 +250,11 @@ class Hooks
return _GetPowerArmorHUDColor();
}

if (MCM::Settings::General::bDisableColor)
{
return _GetPowerArmorHUDColor();
}

if (!MCM::Settings::General::bDisablePAColor)
{
return _GetPowerArmorHUDColor();
Expand Down
2 changes: 2 additions & 0 deletions src/c++/MCM/MCM.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace MCM
public:
inline static bool bEnable{ true };
inline static bool bDisablePAColor{ false };
inline static bool bDisableColor{ false };

inline static double fConditionMeterX{ 136.0 };
inline static double fConditionMeterY{ 675.0 };
Expand All @@ -22,6 +23,7 @@ namespace MCM

GetModSettingBool("General", "bEnable", General::bEnable);
GetModSettingBool("General", "bDisablePAColor", General::bDisablePAColor);
GetModSettingBool("General", "bDisableColor", General::bDisableColor);

GetModSettingDouble("General", "fConditionMeterX", General::fConditionMeterX);
GetModSettingDouble("General", "fConditionMeterY", General::fConditionMeterY);
Expand Down
10 changes: 5 additions & 5 deletions src/c++/Menus/PowerArmorConditionMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ namespace Menus

static void ShowMenu()
{
if (!RE::PowerArmor::PlayerInPowerArmor())
{
return;
}

if (auto UI = RE::UI::GetSingleton())
{
if (UI->GetMenuOpen<PowerArmorConditionMenu>())
Expand All @@ -67,11 +72,6 @@ namespace Menus
return;
}

if (!RE::PowerArmor::PlayerInPowerArmor())
{
return;
}

if (auto UIMessageQueue = RE::UIMessageQueue::GetSingleton())
{
UIMessageQueue->AddMessage(
Expand Down

0 comments on commit e252713

Please sign in to comment.