Colobot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
app
pausemanager.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Colobot: Gold Edition source code
3
* Copyright (C) 2001-2015, Daniel Roux, EPSITEC SA & TerranovaTeam
4
* http://epsitec.ch; http://colobot.info; http://github.com/colobot
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
* See the GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see http://gnu.org/licenses
18
*/
19
24
#pragma once
25
26
#include <string>
27
#include <vector>
28
#include <memory>
29
30
31
enum
PauseType
32
{
33
PAUSE_NONE = 0,
34
PAUSE_USER,
35
PAUSE_SATCOM,
36
PAUSE_SATCOMMOVIE,
37
PAUSE_DIALOG,
38
PAUSE_EDITOR,
39
PAUSE_VISIT,
40
PAUSE_CHEAT,
41
PAUSE_PHOTO,
42
PAUSE_CODE_BATTLE_LOCK
43
};
44
45
struct
ActivePause
46
{
47
private
:
48
friend
class
CPauseManager
;
49
50
explicit
ActivePause
(PauseType type)
51
: type(type)
52
{}
53
54
ActivePause
(
const
ActivePause
&) =
delete
;
55
ActivePause
& operator=(
const
ActivePause
&) =
delete
;
56
57
PauseType type;
58
};
59
60
class
CPauseManager
61
{
62
public
:
63
CPauseManager
();
64
~
CPauseManager
();
65
66
ActivePause
* ActivatePause(PauseType type);
67
void
DeactivatePause(
ActivePause
* pause);
68
69
void
FlushPause();
70
71
bool
IsPause();
72
PauseType GetPauseType();
73
74
private
:
75
void
UpdatePause();
76
77
static
std::string GetPauseName(PauseType pause);
78
79
private
:
80
std::vector<std::unique_ptr<ActivePause>> m_activePause;
81
};
ActivePause
Definition:
pausemanager.h:45
CPauseManager
Definition:
pausemanager.h:60
Generated by
1.8.9.1