Open Source Tomb Raider Engine
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Menu.h 993B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*!
  2. * \file include/Menu.h
  3. * \brief Menu 'overlay' interface
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _MENU_H_
  8. #define _MENU_H_
  9. #include <functional>
  10. #include "UI.h"
  11. /*!
  12. * \brief Menu 'overlay'
  13. */
  14. class Menu : public UI {
  15. public:
  16. virtual ~Menu() { }
  17. virtual int initialize() = 0;
  18. protected:
  19. virtual void showDialog(std::string msg, std::string btn1, std::string btn2,
  20. std::function<int (bool state)> callback = std::function<int (bool)>());
  21. virtual void ackDialog();
  22. virtual bool handleKeyboardDialog(KeyboardButton key, bool pressed);
  23. virtual bool handleMouseClickDialog(unsigned int x, unsigned int y,
  24. KeyboardButton button, bool released);
  25. virtual bool handleMouseScrollDialog(int xrel, int yrel);
  26. virtual void displayDialog();
  27. bool dialogState;
  28. std::string dialogText;
  29. std::string dialogButton1;
  30. std::string dialogButton2;
  31. std::function<int (bool state)> dialogFunction;
  32. };
  33. Menu &getMenu();
  34. #endif