Colobot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
ui
object_interface.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
class
COldObject
;
25
class
CTaskExecutorObject
;
26
class
CProgrammableObject
;
27
class
CProgramStorageObject
;
28
class
CPhysics
;
29
class
CMotion
;
30
class
CRobotMain
;
31
class
CSoundInterface
;
32
class
CLevelParserLine
;
33
struct
Program
;
34
35
namespace
Gfx
36
{
37
class
CEngine;
38
class
CTerrain;
39
class
CWater;
40
class
CCamera;
41
class
CParticle;
42
}
/* Gfx */
43
44
namespace
Ui
45
{
46
class
CStudio;
47
class
CInterface;
48
class
CWindow;
49
50
51
class
CObjectInterface
52
{
53
public
:
54
CObjectInterface
(
COldObject
*
object
);
55
~
CObjectInterface
();
56
57
void
DeleteObject(
bool
bAll=
false
);
58
59
bool
EventProcess(
const
Event
&event);
60
bool
CreateInterface(
bool
bSelect);
61
62
void
UpdateInterface(
float
rTime);
63
void
UpdateInterface();
64
65
protected
:
66
bool
EventFrame(
const
Event
&event);
67
68
void
StartEditScript(
Program
* program,
char
* name);
69
void
StopEditScript(
bool
bCancel);
70
71
void
GroundFlat();
72
void
ColorFlag(
int
color);
73
74
void
UpdateScript(
CWindow
*pw);
75
int
GetSelScript();
76
void
SetSelScript(
int
index);
77
void
BlinkScript(
bool
bEnable);
78
79
void
CheckInterface(
CWindow
*pw,
EventType
event,
bool
bState);
80
void
EnableInterface(
CWindow
*pw,
EventType
event,
bool
bState);
81
void
DeadInterface(
CWindow
*pw,
EventType
event,
bool
bState);
82
void
DefaultEnter(
CWindow
*pw,
EventType
event,
bool
bState=
true
);
83
84
protected
:
85
Gfx::CEngine
* m_engine;
86
Gfx::CTerrain
* m_terrain;
87
Gfx::CWater
* m_water;
88
Gfx::CCamera
* m_camera;
89
Gfx::CParticle
* m_particle;
90
CRobotMain
* m_main;
91
CInterface
* m_interface;
92
CSoundInterface
* m_sound;
93
94
COldObject
* m_object;
95
CTaskExecutorObject
* m_taskExecutor;
96
CProgrammableObject
* m_programmable;
97
CProgramStorageObject
* m_programStorage;
98
CPhysics
* m_physics;
99
CMotion
* m_motion;
100
101
std::unique_ptr<CStudio> m_studio;
102
103
int
m_selScript;
// rank of the selected script
104
105
EventType
m_manipStyle;
106
EventType
m_defaultEnter;
107
108
float
m_time;
109
float
m_lastUpdateTime;
110
float
m_lastAlarmTime;
111
int
m_soundChannelAlarm;
112
int
m_flagColor;
113
};
114
115
}
// namespace Ui
Ui
Definition:
robotmain.h:107
CTaskExecutorObject
Interface for objects that can execute tasks.
Definition:
task_executor_object.h:38
COldObject
Definition:
old_object.h:77
CPhysics
Definition:
physics.h:98
CProgrammableObject
Interface for programmable objects.
Definition:
programmable_object.h:36
CLevelParserLine
Definition:
parserline.h:37
Ui::CObjectInterface
Definition:
object_interface.h:51
CRobotMain
Definition:
robotmain.h:151
Gfx::CParticle
Particle engine.
Definition:
particle.h:223
CProgramStorageObject
Interface for objects that store CBOT programs.
Definition:
program_storage_object.h:43
Gfx::CCamera
Camera moving in 3D scene.
Definition:
camera.h:134
Gfx::CTerrain
Terrain loader/generator and manager.
Definition:
terrain.h:145
Gfx
Namespace for (new) graphics code.
Definition:
app.h:49
CMotion
Definition:
motion.h:46
Gfx::CEngine
The graphics engine.
Definition:
engine.h:620
event.h
Event types, structs and event queue.
Gfx::CWater
Water manager/renderer.
Definition:
water.h:74
EventType
EventType
Type of event message.
Definition:
event.h:41
Event
Event sent by system, interface or game.
Definition:
event.h:709
Ui::CWindow
Definition:
window.h:50
Ui::CInterface
Definition:
interface.h:58
CSoundInterface
Sound plugin interface.
Definition:
sound.h:57
Program
Definition:
program_storage_object.h:31
Generated by
1.8.9.1