Colobot
debug_menu.h
1 /*
2  * This file is part of the Colobot: Gold Edition source code
3  * Copyright (C) 2001-2016, 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 "math/point.h"
23 
24 #include "object/object_type.h"
25 
26 class CRobotMain;
27 class CObjectManager;
28 class CSoundInterface;
29 struct Event;
30 
31 namespace Gfx
32 {
33 class CEngine;
34 }
35 
36 namespace Ui
37 {
38 class CInterface;
39 
41 {
42 public:
44  virtual ~CDebugMenu();
45 
46  void ToggleInterface();
47  bool EventProcess(const Event& event);
48 
49 protected:
50  void CreateInterface();
51  void CreateSpawnInterface();
52  void UpdateInterface();
53  void DestroyInterface();
54 
55  bool HandleSpawnObject(ObjectType type, Math::Point mousePos);
56  bool HandleLightning(Math::Point mousePos);
57  bool HandleTeleport(Math::Point mousePos);
58 
59 protected:
60  CRobotMain* m_main;
61  CInterface* m_interface;
62  Gfx::CEngine* m_engine;
63  CObjectManager* m_objMan;
64  CSoundInterface* m_sound;
65 
66  ObjectType m_spawningType = OBJECT_NULL;
67  bool m_lightningActive = false;
68  bool m_teleportActive = false;
69 };
70 
71 }
Definition: robotmain.h:108
Point struct and related functions.
ObjectType enum.
Definition: robotmain.h:159
Definition: debug_menu.h:40
2D point
Definition: point.h:50
Namespace for (new) graphics code.
Definition: app.h:49
The graphics engine.
Definition: engine.h:585
ObjectType
Type of game object.
Definition: object_type.h:33
Manages CObject instances.
Definition: object_manager.h:148
Event sent by system, interface or game.
Definition: event.h:735
int main(int argc, char *argv[])
Entry point to the program.
Definition: main.cpp:93
Definition: interface.h:59
Sound plugin interface.
Definition: sound.h:60