Colobot
displayinfo.h
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 
20 #pragma once
21 
22 #include "common/event.h"
23 
24 #include "graphics/engine/camera.h"
25 
26 #include <string>
27 
28 class CRobotMain;
29 class CObject;
30 class CEventQueue;
31 class CPauseManager;
32 struct ActivePause;
33 
34 struct Event;
35 
36 namespace Gfx
37 {
38 class CEngine;
39 class CParticle;
40 class CLightManager;
41 }
42 
43 namespace Ui
44 {
45 
46 class CInterface;
47 
49 {
50 public:
51  CDisplayInfo();
52  ~CDisplayInfo();
53 
54  bool EventProcess(const Event &event);
55 
56  void StartDisplayInfo(std::string filename, int index, bool bSoluce);
57  void StopDisplayInfo();
58 
59  void SetPosition(int pos);
60  int GetPosition();
61 
62 protected:
63  bool EventFrame(const Event &event);
64  void HyperUpdate();
65  void AdjustDisplayInfo(Math::Point wpos, Math::Point wdim);
66  void ChangeIndexButton(int index);
67  void UpdateIndexButton();
68  void UpdateCopyButton();
69  void ViewDisplayInfo();
70  CObject* SearchToto();
71 
72 protected:
73  Gfx::CEngine* m_engine;
74  CEventQueue* m_event;
75  CRobotMain* m_main;
76  Gfx::CCamera* m_camera;
77  CInterface* m_interface;
78  Gfx::CParticle* m_particle;
79  Gfx::CLightManager* m_light;
80  CPauseManager* m_pause;
81 
82  bool m_bInfoMaximized;
83  bool m_bInfoMinimized;
84 
85  int m_index;
86  Gfx::CameraType m_infoCamera;
87  Math::Point m_infoNormalPos;
88  Math::Point m_infoNormalDim;
89  Math::Point m_infoActualPos;
90  Math::Point m_infoActualDim;
91  Math::Point m_infoFinalPos;
92  Math::Point m_infoFinalDim;
93  int m_lightSuppl;
94  bool m_bEditLock;
95  ActivePause* m_satcomPause = nullptr;
96  bool m_bSoluce;
97  CObject* m_toto;
98 };
99 
100 
101 } // namespace Ui
CameraType
Type of camera.
Definition: camera.h:46
Definition: pausemanager.h:45
Definition: robotmain.h:107
Camera handling - CCamera class.
Global event queue.
Definition: event.h:840
Manager for dynamic lights in 3D scene.
Definition: lightman.h:146
Definition: robotmain.h:151
Particle engine.
Definition: particle.h:223
2D point
Definition: point.h:50
Camera moving in 3D scene.
Definition: camera.h:134
Namespace for (new) graphics code.
Definition: app.h:49
The graphics engine.
Definition: engine.h:620
Event types, structs and event queue.
Definition: displayinfo.h:48
Event sent by system, interface or game.
Definition: event.h:709
Definition: pausemanager.h:60
Definition: interface.h:58
Base class for all 3D in-game objects.
Definition: object.h:59