ScummVM API documentation
trade.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 MM1_VIEWS_ENH_TRADE_H
23
#define MM1_VIEWS_ENH_TRADE_H
24
25
#include "mm/mm1/views_enh/scroll_view.h"
26
#include "mm/mm1/views_enh/text_entry.h"
27
28
namespace
MM
{
29
namespace
MM1 {
30
namespace
ViewsEnh {
31
32
class
Trade
:
public
ScrollView
{
33
private
:
34
enum
TradeMode { TRADE_OPTIONS, TRADE_GEMS, TRADE_GOLD, TRADE_FOOD };
35
const
char
*
const
TRADE_NAMES[4] = {
nullptr
,
"GEMS"
,
"GOLD"
,
"FOOD"
};
36
TradeMode _mode = TRADE_OPTIONS;
37
Shared::Xeen::SpriteResource
_btnIcons;
38
TextEntry
_textEntry;
39
static
void
abortFunc();
40
static
void
enterFunc(
const
Common::String
&str);
41
45
void
setMode(TradeMode mode);
46
50
void
drawOptions();
51
55
void
amountEntered(uint amount);
56
57
public
:
58
Trade
();
59
virtual
~
Trade
() {}
60
61
bool
msgFocus
(
const
FocusMessage
&msg)
override
;
62
bool
msgUnfocus(
const
UnfocusMessage
&msg)
override
;
63
void
draw
()
override
;
64
bool
msgKeypress(
const
KeypressMessage
&msg)
override
;
65
bool
msgAction(
const
ActionMessage
&msg)
override
;
66
};
67
68
}
// namespace ViewsEnh
69
}
// namespace MM1
70
}
// namespace MM
71
72
#endif
Common::String
Definition:
str.h:59
MM::Shared::Xeen::SpriteResource
Definition:
sprites.h:52
MM::MM1::ViewsEnh::Trade::msgFocus
bool msgFocus(const FocusMessage &msg) override
MM::MM1::ViewsEnh::TextEntry
Definition:
text_entry.h:34
MM::MM1::KeypressMessage
Definition:
messages.h:56
MM::MM1::ViewsEnh::ScrollView
Definition:
scroll_view.h:35
MM::MM1::ViewsEnh::Trade
Definition:
trade.h:32
MM::MM1::ActionMessage
Definition:
messages.h:49
MM::MM1::ViewsEnh::Trade::draw
void draw() override
MM
Definition:
detection.h:27
MM::MM1::UnfocusMessage
Definition:
messages.h:48
MM::MM1::FocusMessage
Definition:
messages.h:41
engines
mm
mm1
views_enh
trade.h
Generated on Tue Dec 3 2024 09:19:09 for ScummVM API documentation by
1.8.13