-
Notifications
You must be signed in to change notification settings - Fork 7
/
Scaleform.h
52 lines (42 loc) · 895 Bytes
/
Scaleform.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include "ObjectRef.h"
#include "Menus.h"
namespace Tralala
{
class LockOnMenu :
public IMenu
{
static LockOnMenu* m_instance;
GFxValue m_root;
BSFixedString m_menuName;
TESObjectREFR* m_refTarget;
PlayerInputHandler* m_lookHandler;
bool m_isLockOn;
LockOnMenu();
~LockOnMenu();
void OnMenuOpen();
void OnMenuClose();
UInt32 ProcessMessage(UIMessage* message) override;
public:
LockOnMenu(const LockOnMenu&) = delete;
LockOnMenu& operator=(const LockOnMenu&) = delete;
void Open(TESObjectREFR * target);
void Close();
bool SetTargetPosition(GFxValue* args);
bool IsOpen() const
{
return m_isLockOn;
}
TESObjectREFR* GetTarget() const
{
return m_refTarget;
}
// thread-unsafe but works fine
static IMenu* GetSingleton()
{
if (!m_instance)
m_instance = new LockOnMenu;
return m_instance;
}
};
}