ScummVM API documentation
form_party.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef ULTIMA3_VIEWS_FORM_PARTY_H
23#define ULTIMA3_VIEWS_FORM_PARTY_H
24
25#include "ultima/ultima3/data/roster.h"
26#include "ultima/ultima3/views/menu_input.h"
27#include "ultima/ultima3/views/window_view.h"
28
29namespace Ultima {
30namespace Ultima3 {
31namespace Views {
32
37class FormParty : public WindowView {
38private:
39 enum State {
40 ENTRY,
41 MESSAGE
42 };
43
44 State _state = ENTRY;
45 NumberInput _numbers[Data::PARTY_MAX];
46 bool _showSelection = true;
47 const char *_message = nullptr;
48 int _messageCol = 0, _messageRow = 0;
49
50 void showMessage(const char *message, int col, int row);
51 void fail(const char *message);
52 void finish();
53
54public:
55 FormParty();
56 ~FormParty() override {}
57
58 bool msgFocus(const FocusMessage &msg) override;
59 void draw() override;
60 bool msgKeypress(const KeypressMessage &msg) override;
61};
62
63} // namespace Views
64} // namespace Ultima3
65} // namespace Ultima
66
67#endif
Definition: form_party.h:37
Definition: menu_input.h:145
Definition: window_view.h:38
Definition: messages.h:42
Definition: messages.h:54