-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCGuiObject.h
More file actions
executable file
·43 lines (34 loc) · 894 Bytes
/
CGuiObject.h
File metadata and controls
executable file
·43 lines (34 loc) · 894 Bytes
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
#include <windows.h>
#include <d3dx9.h>
#include "resource.h"
//inclusion guards
#ifndef GuiObject
#define GuiObject
class CGuiObject
{
public:
CGuiObject();
CGuiObject(LPDIRECT3DDEVICE9 l_directXDevice, char* id, int l_width, int l_height,
int l_screenWidth, int l_screenHeight, int xLoc, int yLoc);
HRESULT setImage(const char *filePath, DWORD keyColour);
char* getID();
int getObjectWidth();
int getObjectHeight();
int getScreenWidth();
int getScreenHeight();
POINT getLocation();
void setLocation(int x, int y);
bool mouseIsOver(int mouseX, int mouseY);
void render(double xLoc, double yLoc);
protected:
char* ID;
int objectWidth;
int objectHeight;
int screenWidth;
int screenHeight;
POINT location;
LPDIRECT3DDEVICE9 directXDevice; // Device Pointer
LPD3DXSPRITE sprite;
LPDIRECT3DTEXTURE9 texture;
};
#endif