-
Notifications
You must be signed in to change notification settings - Fork 0
/
SDLstuff.h
41 lines (31 loc) · 899 Bytes
/
SDLstuff.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
#ifndef _SDLSTUFF_H
#define _SDLSTUFF_H
#include <SDL.h>
#include "Engine.h"
#include "Font.h"
#include <iostream>
using namespace std;
class SDLstuff{
public:
SDLstuff();
~SDLstuff();
void init();
void checkEvents();
void grabKeyAndMouse();
void ungrabKeyAndMouse();
void closeSDL_Net();
SDL_Window* getMainWindow(){ return mainWindow; }
void printResolution();
void tweakFontSize();
private:
SDL_Event event;
SDL_Window* mainWindow;
SDL_GLContext sdl_glContext;
void handleKeyPressEvent(SDL_Keysym * keysym);
void handleKeyReleaseEvent(SDL_Keysym * keysym);
void handleMousePressEvent(SDL_MouseButtonEvent * mouse);
void handleMouseReleaseEvent(SDL_MouseButtonEvent * mouse);
void handleMouseMotionEvent(SDL_MouseMotionEvent* mouseMotion);
char title[16];
};
#endif