Symphony Of Empires
interface.hpp
Go to the documentation of this file.
1 // Eng3D - General purpouse game engine
2 // Copyright (C) 2021, Eng3D contributors
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <https://www.gnu.org/licenses/>.
16 //
17 // ----------------------------------------------------------------------------
18 // Name:
19 // interface.hpp
20 //
21 // Abstract:
22 // Provides common UI elements from Eng3D to debug/profile or do other
23 // things in-game.
24 // ----------------------------------------------------------------------------
25 
26 #pragma once
27 
28 #include <vector>
29 #include "eng3d/ui/window.hpp"
30 #include "eng3d/ui/group.hpp"
31 
32 namespace UI {
33  class Label;
34  struct Div;
35 }
36 
37 namespace Eng3D {
38  class State;
39  class BenchmarkTask;
40  struct Profiler;
41 }
42 
43 namespace Eng3D::Interface {
44  class ProfilerTaskView;
45  class ProfilerView : public UI::Window {
46  Eng3D::State& s;
47  Eng3D::Profiler& profiler;
48  std::vector<ProfilerTaskView*> task_views;
49  public:
51  };
52 
53  class ProfilerTaskView : public UI::Group {
54  UI::Label* label;
55  UI::Div* color_box;
56  public:
57  ProfilerTaskView(ProfilerView* profiler_view, int x, int y);
58  void set_task(Eng3D::BenchmarkTask& profiler_view);
59  };
60 }
ProfilerTaskView(ProfilerView *profiler_view, int x, int y)
Definition: interface.cpp:83
void set_task(Eng3D::BenchmarkTask &profiler_view)
Definition: interface.cpp:90
ProfilerView(Eng3D::State &s, Eng3D::Profiler &profiler)
Definition: interface.cpp:34
Grouping to keep widgets together without triggering events.
Definition: group.hpp:44
Simple widget for drawing text on the screen, no multiline support.
Definition: label.hpp:40
Window widget, this widget is similar to a Group widget, the key difference is that this one can be m...
Definition: window.hpp:39
A basic widget without any presets.
Definition: div.hpp:38