Colobot
trace_drawing_object.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 
23 
24 #include <string>
25 
26 namespace Gfx
27 {
28 struct Color;
29 }
30 
31 enum class TraceColor
32 {
33  Default = -1,
34 
35  White = 0,
36  Black = 1,
37  Gray = 2,
38  LightGray = 3,
39  Red = 4,
40  Pink = 5,
41  Purple = 6,
42  Orange = 7,
43  Yellow = 8,
44  Beige = 9,
45  Brown = 10,
46  Skin = 11,
47  Green = 12,
48  LightGreen = 13,
49  Blue = 14,
50  LightBlue = 15,
51  BlackArrow = 16,
52  RedArrow = 17,
53  Max,
54 };
56 std::string TraceColorName(TraceColor color);
58 Gfx::Color TraceColorColor(TraceColor color);
59 
65 {
66 public:
67  explicit CTraceDrawingObject(ObjectInterfaceTypes& types)
68  {
69  types[static_cast<int>(ObjectInterfaceType::TraceDrawing)] = true;
70  }
71  virtual ~CTraceDrawingObject()
72  {}
73 
75  virtual void SetTraceDown(bool down) = 0;
77  virtual bool GetTraceDown() = 0;
78 
80  virtual void SetTraceColor(TraceColor color) = 0;
82  virtual TraceColor GetTraceColor() = 0;
83 
85  virtual void SetTraceWidth(float width) = 0;
87  virtual float GetTraceWidth() = 0;
88 };
float Max(float a, float b)
Maximum.
Definition: func.h:75
Interface for objects that can draw wheel trace (at the moment, all movable objects) ...
Definition: trace_drawing_object.h:64
objects that can draw wheel trace
ObjectInterfaceType enum.
Namespace for (new) graphics code.
Definition: app.h:49
RGBA color.
Definition: color.h:39