/src/Menu.h

https://bitbucket.org/brunobottazzini/olympia-game · 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. Model of the Class to get Menu
  5. Bruno Lara Bottazzini
  6. */
  7. #include <irrlicht.h>
  8. using namespace irr;
  9. using namespace core;
  10. using namespace scene;
  11. using namespace video;
  12. using namespace io;
  13. using namespace gui;
  14. #ifdef _IRR_WINDOWS_
  15. #pragma comment(lib, "Irrlicht.lib")
  16. #endif
  17. struct SAppContext
  18. {
  19. IrrlichtDevice *device;
  20. IGUIListBox* renderBox;
  21. IGUIListBox* resolutionBox;
  22. IGUICheckBox* full_check;
  23. IGUICheckBox* anti_check;
  24. IGUICheckBox* sync_check;
  25. IGUICheckBox* shadow_check;
  26. s32 renderOption;
  27. s32 resolution;
  28. bool startButton;
  29. bool fullscreen;
  30. bool antialiasing;
  31. bool shadow;
  32. bool synvertical;
  33. };
  34. enum
  35. {
  36. GUI_ID_QUIT_BUTTON = 101,
  37. GUI_ID_WINDOW_OPTIONS,
  38. GUI_ID_FILE_OPEN_BUTTON,
  39. GUI_ID_START,
  40. GUI_ID_OK_BUTTON_OPTIONS,
  41. GUI_ID_TRANSPARENCY_SCROLL_BAR
  42. };
  43. class MenuEventReceiver : public IEventReceiver
  44. {
  45. public:
  46. MenuEventReceiver(SAppContext & context);
  47. virtual bool OnEvent(const SEvent& event);
  48. private:
  49. SAppContext & Context;
  50. s32 selected;
  51. s32 resolution;
  52. IGUIWindow* window;
  53. bool fullscreen;
  54. bool antialiasing;
  55. bool shadow;
  56. bool color_setted;
  57. bool synvertical;
  58. };
  59. #endif