/src/Menu.h
C Header | 66 lines | 55 code | 7 blank | 4 comment | 0 complexity | 246e49d72a5cf76994aa1c8e0f67108d MD5 | raw file
1#ifndef __MENU_H_INCLUDED__
2#define __MENU_H_INCLUDED__
3
4/*
5Model of the Class to get Menu
6Bruno Lara Bottazzini
7*/
8#include <irrlicht.h>
9
10using namespace irr;
11using namespace core;
12using namespace scene;
13using namespace video;
14using namespace io;
15using namespace gui;
16
17#ifdef _IRR_WINDOWS_
18#pragma comment(lib, "Irrlicht.lib")
19#endif
20
21struct SAppContext
22{
23 IrrlichtDevice *device;
24 IGUIListBox* renderBox;
25 IGUIListBox* resolutionBox;
26 IGUICheckBox* full_check;
27 IGUICheckBox* anti_check;
28 IGUICheckBox* sync_check;
29 IGUICheckBox* shadow_check;
30 s32 renderOption;
31 s32 resolution;
32 bool startButton;
33 bool fullscreen;
34 bool antialiasing;
35 bool shadow;
36 bool synvertical;
37};
38
39enum
40{
41 GUI_ID_QUIT_BUTTON = 101,
42 GUI_ID_WINDOW_OPTIONS,
43 GUI_ID_FILE_OPEN_BUTTON,
44 GUI_ID_START,
45 GUI_ID_OK_BUTTON_OPTIONS,
46 GUI_ID_TRANSPARENCY_SCROLL_BAR
47};
48
49class MenuEventReceiver : public IEventReceiver
50{
51public:
52 MenuEventReceiver(SAppContext & context);
53 virtual bool OnEvent(const SEvent& event);
54private:
55 SAppContext & Context;
56 s32 selected;
57 s32 resolution;
58 IGUIWindow* window;
59 bool fullscreen;
60 bool antialiasing;
61 bool shadow;
62 bool color_setted;
63 bool synvertical;
64};
65
66#endif