WidgetMainMenu.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright © 2011-2020 Frictional Games
  3. *
  4. * This file is part of Amnesia: A Machine For Pigs.
  5. *
  6. * Amnesia: A Machine For Pigs is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. * Amnesia: A Machine For Pigs is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with Amnesia: A Machine For Pigs. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. #ifndef HPL_WIDGET_MAIN_MENU
  19. #define HPL_WIDGET_MAIN_MENU
  20. #include "gui/WidgetMenu.h"
  21. #include "gui/GuiSkin.h"
  22. namespace hpl {
  23. class cWidgetMainMenu : public iWidgetMenu
  24. {
  25. public:
  26. cWidgetMainMenu(cGuiSet *apSet, cGuiSkin *apSkin);
  27. ~cWidgetMainMenu();
  28. //////////////////////////////
  29. // Implemented iWidgetMenu functions
  30. void Hide();
  31. protected:
  32. //////////////////////////////
  33. // Implemented iWidgetMenu functions
  34. void UpdateMenuItemsPos(cWidgetMenuItem* apNewItem);
  35. void UpdateMenuItemsSize(cWidgetMenuItem* apNewItem);
  36. void OnChildMenuHide();
  37. //////////////////////////////
  38. // Implemented iWidget functions
  39. void OnDraw(float afTimeStep, cGuiClipRegion *apClipRegion);
  40. void OnUpdate(float afTimeStep);
  41. void OnInit();
  42. void OnLoadGraphics();
  43. /////////////////////////////
  44. // Data
  45. float mfItemSeparation;
  46. float mfItemVPadding;
  47. float mfItemTextPadding;
  48. cGuiGfxElement* mpGfxBackground;
  49. };
  50. };
  51. #endif // HPL_WIDGET_MAIN_MENU