Skip to content

Commit 4bc16c9

Browse files
committed
feat: MenuControls
1 parent 1b617ab commit 4bc16c9

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

include/RE/IDs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,11 @@ namespace RE::ID
14721472

14731473
namespace MenuControls
14741474
{
1475+
inline constexpr REL::ID ForcePauseGame{ 2249384 };
1476+
inline constexpr REL::ID ForceResumeGame{ 2249385 };
1477+
inline constexpr REL::ID RegisterHandler{ 2249387 };
14751478
inline constexpr REL::ID Singleton{ 4796375 };
1479+
inline constexpr REL::ID UnregisterHandler{ 2249388 };
14761480
}
14771481

14781482
namespace MenuCursor

include/RE/M/MenuControls.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,45 @@ namespace RE
2727
return *singleton;
2828
}
2929

30+
void ForcePauseGame() const
31+
{
32+
using func_t = decltype(&MenuControls::ForcePauseGame);
33+
static REL::Relocation<func_t> func{ ID::MenuControls::ForcePauseGame };
34+
func(this);
35+
}
36+
37+
void ForceResumeGame() const
38+
{
39+
using func_t = decltype(&MenuControls::ForceResumeGame);
40+
static REL::Relocation<func_t> func{ ID::MenuControls::ForceResumeGame };
41+
func(this);
42+
}
43+
3044
bool QueueScreenshot() const
3145
{
3246
if (!screenshotHandler || screenshotHandler->screenshotQueued) {
3347
return false;
3448
}
49+
3550
screenshotHandler->screenshotQueued = true;
51+
3652
return true;
3753
}
3854

55+
void RegisterHandler(BSInputEventUser* a_handler)
56+
{
57+
using func_t = decltype(&MenuControls::RegisterHandler);
58+
static REL::Relocation<func_t> func{ ID::MenuControls::RegisterHandler };
59+
func(this, a_handler);
60+
}
61+
62+
void UnregisterHandler(BSInputEventUser* a_handler)
63+
{
64+
using func_t = decltype(&MenuControls::UnregisterHandler);
65+
static REL::Relocation<func_t> func{ ID::MenuControls::UnregisterHandler };
66+
func(this, a_handler);
67+
}
68+
3969
// members
4070
BSTArray<BSInputEventUser*> handlers; // 18
4171
GFxConvertHandler* convertHandler; // 30

0 commit comments

Comments
 (0)