-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuiMainAux.h
42 lines (29 loc) · 962 Bytes
/
GuiMainAux.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
/*
* GuiMainAux.h
*
* Created on: Mar 11, 2018
* Author: tomhe
*/
#ifndef GUIMAINAUX_H_
#define GUIMAINAUX_H_
#include <SDL.h>
#include <SDL_video.h>
#include "PieceWidget.h"
SDL_Window* createWindow(const char* window_name, int width, int height);
void changeWindowName(SDL_Window* window, const char* new_window_name);
SDL_Renderer* createRenderer(SDL_Window* window);
/*
* presents a messageBox for the user, before exiting the game to main window or quit.
* the options are yes, no, cancel.
* cancel (or BACK in save window) returns to the game window, and the game can continue as nothing happened.
*/
int messageBoxBeforeExitingGame();
/*
* we use this function whenever there's a error.
* only OK option will be available.
*/
void errorMessageBox(char* error);
void setDefaultPiecesPositions();
int createWidgets(SDL_Renderer* rend);
void destroyPieces();
#endif /* GUIMAINAUX_H_ */