/src/MenuTalker.h

http://github.com/clintbellanger/flare · C Header · 72 lines · 37 code · 16 blank · 19 comment · 0 complexity · 9585ce140e757941b9e51265a729c079 MD5 · raw file

  1. /*
  2. Copyright 2011 Clint Bellanger and morris989
  3. This file is part of FLARE.
  4. FLARE is free software: you can redistribute it and/or modify it under the terms
  5. of the GNU General Public License as published by the Free Software Foundation,
  6. either version 3 of the License, or (at your option) any later version.
  7. FLARE is distributed in the hope that it will be useful, but WITHOUT ANY
  8. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. PARTICULAR PURPOSE. See the GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License along with
  11. FLARE. If not, see http://www.gnu.org/licenses/
  12. */
  13. /**
  14. * class MenuTalker
  15. */
  16. #ifndef MENU_TALKER_H
  17. #define MENU_TALKER_H
  18. #include "Utils.h"
  19. #include "FontEngine.h"
  20. #include "NPC.h"
  21. #include "CampaignManager.h"
  22. #include "WidgetButton.h"
  23. #include <SDL.h>
  24. #include <SDL_image.h>
  25. #include <SDL_mixer.h>
  26. #include <string>
  27. #include <sstream>
  28. class MenuTalker {
  29. private:
  30. CampaignManager *camp;
  31. void loadGraphics();
  32. SDL_Surface *background;
  33. SDL_Surface *portrait;
  34. SDL_Surface *msg_buffer;
  35. std::string hero_name;
  36. int dialog_node;
  37. public:
  38. MenuTalker(CampaignManager *camp);
  39. ~MenuTalker();
  40. NPC *npc;
  41. void chooseDialogNode();
  42. void logic();
  43. void render();
  44. void setHero(const std::string& name, const std::string& portrait_filename);
  45. void createBuffer();
  46. bool visible;
  47. int event_cursor;
  48. bool accept_lock;
  49. WidgetButton *advanceButton;
  50. WidgetButton *closeButton;
  51. };
  52. #endif