-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgButtons.h
52 lines (36 loc) · 838 Bytes
/
gButtons.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
#ifndef GBUTTONS_H
#define GBUTTONS_H
#include <SDL.h>
#include <SDL_image.h>
#include <stdio.h>
#include <string>
#include "map.h"
#include "screen.h"
//Button constants
class LButton
{
friend bool menuloadMedia();
friend bool shoploadMedia();
friend bool missionloadMedia();
friend void shopclose();
friend void missionclose();
friend void menuclose();
public:
//Initializes internal variables
LButton();
//Sets top left position
void setPosition( int x, int y );
//Handles mouse event
void handleEvent( SDL_Event* e );
//Shows button sprite
void render();
bool show;
bool press;
int BUTTON_WIDTH;
int BUTTON_HEIGHT;
//Top left position
SDL_Point mPosition;
//Currently used global sprite
LTexture mCurrentsurface;
};
#endif