-
Notifications
You must be signed in to change notification settings - Fork 2
/
minimap.h
48 lines (36 loc) · 985 Bytes
/
minimap.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
#ifndef MINIMAP_H
#define MINIMAP_H
#include <vector>
#include <QWidget>
#include <windows.h>
#include "modules/engine.h"
#include "modules/autoloot.h"
class Minimap : public QWidget
{
Q_OBJECT
public:
explicit Minimap(QWidget *parent = 0);
~Minimap();
protected:
void paintEvent(QPaintEvent *) override;
void resizeEvent(QResizeEvent *e) override;
bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
private slots:
void repositionWindow();
private:
void drawInfo(QPainter *p);
void drawMinimap(QPainter *p);
void drawCoordinates(QPainter *p);
QRect getD3ClientRect();
bool registerHotkey(const char* name, unsigned int key, unsigned int mods = 0);
bool registerHotKeys();
private:
QTransform minimapTransform;
D3::Engine *engine;
D3::AutoLoot *autoLoot;
HWND d3Window;
bool draw_minimap;
bool size_changed;
std::vector<int> hotkey_ids;
};
#endif // MINIMAP_H