PageRenderTime 20ms CodeModel.GetById 11ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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