ScummVM API documentation
title.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 ULTIMA2_VIEWS_TITLE_H
23
#define ULTIMA2_VIEWS_TITLE_H
24
25
#include "graphics/managed_surface.h"
26
#include "graphics/palette.h"
27
#include "ultima/shared/engine/view.h"
28
#include "ultima/ultima2/gfx/text_cursor.h"
29
30
namespace
Ultima {
31
namespace
Ultima2 {
32
namespace
Views {
33
34
using namespace
Graphics::Views;
35
45
class
Title
:
public
Shared::View
{
46
private
:
47
enum
State {
48
TEXT1, TEXT2, PICDRA, MENU,
49
DEMO_OUT, DEMO_TWN, DEMO_CAS, DEMO_DNG, DEMO_SPA, DEMO_MIN
50
};
51
State _state = TEXT1;
52
bool
_demoMode =
false
;
53
54
// The single picture currently on screen, if any (loaded lazily per state)
55
Graphics::ManagedSurface
_pic;
56
57
// Blinking cursor shown after "CHOICE:" while the menu is active
58
Gfx::TextCursor
_cursor;
59
60
void
loadPic(
const
Common::String
&filename);
61
void
showMenu();
62
void
showState(State state);
63
64
public
:
65
Title
();
66
~Title
()
override
{}
67
68
bool
msgFocus(
const
FocusMessage
&msg)
override
;
69
bool
msgUnfocus(
const
UnfocusMessage
&msg)
override
;
70
void
draw
()
override
;
71
void
timeout
()
override
;
72
73
bool
msgKeypress(
const
KeypressMessage
&msg)
override
;
74
bool
msgAction(
const
ActionMessage
&msg)
override
;
75
};
76
77
}
// namespace Views
78
}
// namespace Ultima2
79
}
// namespace Ultima
80
81
#endif
Common::String
Definition:
str.h:59
Graphics::ManagedSurface
Definition:
managed_surface.h:51
Ultima::Shared::View
Definition:
view.h:35
Ultima::Ultima2::Gfx::TextCursor
Definition:
text_cursor.h:36
Ultima::Ultima2::Views::Title
Definition:
title.h:45
Ultima::Ultima2::Views::Title::timeout
void timeout() override
Ultima::Ultima2::Views::Title::draw
void draw() override
Graphics::Views::ActionMessage
Definition:
messages.h:118
Graphics::Views::FocusMessage
Definition:
messages.h:42
Graphics::Views::KeypressMessage
Definition:
messages.h:54
Graphics::Views::UnfocusMessage
Definition:
messages.h:50
engines
ultima
ultima2
views
title.h
Generated on Sun Nov 22 2026 09:34:26 for ScummVM API documentation by
1.9.4