Skip to content

Commit

Permalink
#37 Replace widget 'page_autooff_guide' with 'page_notification'
Browse files Browse the repository at this point in the history
Replace widget 'page_autooff_guide' with 'page_notification'
  • Loading branch information
TheRouletteBoi committed Aug 3, 2023
1 parent 30f6bd3 commit bf190c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Core/Helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void Helpers::OnUpdate()
system_plugin = vsh::paf::View::Find("system_plugin");
xmb_plugin = vsh::paf::View::Find("xmb_plugin");

page_autooff_guide = system_plugin ? system_plugin->FindWidget("page_autooff_guide") : nullptr;
page_notification = system_plugin ? system_plugin->FindWidget("page_notification") : nullptr;


MonitorGameState();
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Helpers
vsh::paf::View* game_plugin{};
vsh::paf::View* system_plugin{};
vsh::paf::View* xmb_plugin{};
vsh::paf::PhWidget* page_autooff_guide{};
vsh::paf::PhWidget* page_notification{};

bool m_IsHen{};
bool m_StateGameRunning{};
Expand Down
12 changes: 6 additions & 6 deletions src/Core/Rendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void Render::OnUpdate()
if (!g_Helpers.system_plugin)
return;

if (!g_Helpers.page_autooff_guide)
if (!g_Helpers.page_notification)
{
DestroyWidgets();
return;
Expand Down Expand Up @@ -62,10 +62,10 @@ void Render::Text(const std::string& text, vsh::vec2 position, float height, Ali

vsh::paf::PhText* Render::CreateText(const std::string& widgetName)
{
if (!g_Helpers.page_autooff_guide)
if (!g_Helpers.page_notification)
return nullptr;

vsh::paf::PhText* phText = new vsh::paf::PhText(g_Helpers.page_autooff_guide);
vsh::paf::PhText* phText = new vsh::paf::PhText(g_Helpers.page_notification);
phText->SetName(widgetName)
.SetColor(vsh::vec4())
.SetStyle(0x13, 0x70);
Expand All @@ -85,7 +85,7 @@ vsh::paf::PhText* Render::GetText(int index)

void Render::CreateWidgets()
{
if (!g_Helpers.page_autooff_guide)
if (!g_Helpers.page_notification)
return;

// don't create any more planes if we already created the first one
Expand All @@ -109,7 +109,7 @@ void Render::CreateWidgets()

void Render::DestroyWidgets()
{
if (!g_Helpers.page_autooff_guide)
if (!g_Helpers.page_notification)
return;

// clear pointers if no longer valid
Expand All @@ -136,7 +136,7 @@ void Render::DestroyWidgets()

void Render::ClearTexts()
{
if (!g_Helpers.page_autooff_guide)
if (!g_Helpers.page_notification)
return;

if (vsh::paf::PhText* phText = GetText(0))
Expand Down

0 comments on commit bf190c4

Please sign in to comment.