forked from BoyC/GW2TacO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GW2TacO.h
117 lines (93 loc) · 2.92 KB
/
GW2TacO.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#pragma once
#include "Bedrock/WhiteBoard/WhiteBoard.h"
#include "gw2tactical.h"
#include "TS3Connection.h"
#include <thread>
enum class TacOKeyAction : TS32
{
NoAction = 0,
AddPOI,
RemovePOI,
ActivatePOI,
EditNotepad,
StartTrailRec,
PauseTrailRec,
DeleteLastTrailSegment,
ResumeTrailAndCreateNewSection,
Toggle_tactical_layer,
Toggle_range_circles,
Toggle_tactical_compass,
Toggle_locational_timers,
Toggle_hp_grids,
Toggle_mouse_highlight,
Toggle_map_timer,
Toggle_ts3_window,
Toggle_marker_editor,
Toggle_notepad,
Toggle_raid_progress,
Toggle_dungeon_progress,
Toggle_tp_tracker,
Toggle_window_edit_mode,
//if you add one here, add it to the ActionNames array in the .cpp as well!
};
enum class APIKeys
{
None = 0,
TS3APIKey,
GW2APIKey,
};
extern CString ActionNames[];
class GW2TacO : public CWBItem
{
CString lastInfoLine;
TBOOL RebindMode = false;
TBOOL ScriptRebindMode = false;
TacOKeyAction ActionToRebind = TacOKeyAction::NoAction;
TS32 ScriptActionToRebind = 0;
TBOOL ApiKeyInputMode = false;
APIKeys ApiKeyToSet = APIKeys::None;
TS32 ApiKeyIndex = 0;
void OpenAboutWindow();
void BuildChannelTree( TS3Connection::TS3Schandler &h, CWBContextItem *parentitm, TS32 ParentID );
CDictionary<TS32, TacOKeyAction> KeyBindings;
CDictionary<TS32, CString> ScriptKeyBindings;
void RebindAction( TacOKeyAction Action );
void RebindScriptKey( TS32 evendIDX );
CArray<GW2TacticalCategory*> CategoryList;
//CArray<AngelWrapper*> scriptEngines;
void ApiKeyInputAction( APIKeys keyType, TS32 idx );
CWBTextBox* APIKeyInput = nullptr;
TBOOL menuHoverLastFrame = false;
TS32 lastMenuHoverTransitionTime = 0;
void TurnOnTPLight();
void TurnOffTPLight();
void CheckItemPickup();
CString lastItemPickup;
TBOOL pickupsBeingFetched = false;
std::thread pickupFetcherThread;
TS32 lastPickupFetchTime = 0;
TBOOL showPickupHighlight = false;
float lastScaleValue = 1.0f;
void StoreIconSizes();
void AdjustMenuForWindowTooSmallScale(float scale);
CString mouseToolTip;
CString GetKeybindString(TacOKeyAction action);
public:
virtual void OnDraw( CWBDrawAPI *API );
virtual void OnPostDraw(CWBDrawAPI* API);
virtual TBOOL IsMouseTransparent( CPoint &ClientSpacePoint, WBMESSAGE MessageType );
GW2TacO( CWBItem *Parent, CRect Position );
virtual ~GW2TacO();
static CWBItem *Factory( CWBItem *Root, CXMLNode &node, CRect &Pos );
WB_DECLARE_GUIITEM( _T( "GW2TacO" ), CWBItem );
void OpenWindow( CString s );
virtual TBOOL MessageProc( CWBMessage &Message ); //return true if this item handled the message
void SetInfoLine( const CString& string );
void SetMouseToolTip(const CString& toolTip);
void InitScriptEngines();
void TickScriptEngine();
void TriggerScriptEngineAction( GUID& guid );
void TriggerScriptEngineKeyEvent( const CString& eventID );
};
extern CString UIFileNames[];
void SetMouseToolTip(const CString& toolTip);