Chronos 0.0
A advanced 2D rendering and animation system
Loading...
Searching...
No Matches
editorManager.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2024 Rahul Satish Vadhyar
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to deal
6in the Software without restriction, including without limitation the rights
7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in all
12copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20SOFTWARE.
21*/
22
23#pragma once
24#include "chronos.hpp"
25namespace Chronos {
26namespace Editor {
28 public:
30 {
31 this->manager = manager;
32 }
33 void addElements();
34
35 private:
37 bool pinMenuBar = true;
38
39 bool showShapeWindow = false;
40 bool showTextureWindow = false;
41 bool showTextWindow = false;
42 bool showAnimationWindow = false;
43 bool showSettingsWindow = false;
45
50
52 bool showDebugLogWindow = false;
53#ifdef CHRONOS_PROFILING
54 bool showProfilingWindow = false;
55#endif
56
57 void MenuBar();
58 void ShapeWindow();
59 void TextureWindow();
60 void TextWindow();
61 void AnimationWindow();
62 void SettingsWindow();
64
65 void ShapeDetailsWindow();
67 void TextDetailsWindow();
69
70 void DebugMetricsWindow();
71 void DebugLogWindow();
72#ifdef CHRONOS_PROFILING
73 void ProfilingWindow();
74#endif
75
76 int getKeyframeNo(float* valuePointer);
77 bool doesKeyframeExist(float* valuePointer);
78 void keyframeCheckbox(float* valuePointer, std::string name);
79 void updateKeyframes();
80
81 // Shape Window
83 int newShapeFill = 0;
85 char currentShapeTextureName[200] = "Select Texture";
87
88 // Texture Window
89 char newTexturePath[200];
90 char newTextureName[200];
92
93 // Text Window
95 std::string currentFontSelection = "consolas";
98
99 // Shape details window
102
103 // text details window
106
107 // texture details window
109
110 // settings window
111 char windowTitle[200] = GAME_NAME;
112 std::string presentMode = "mailbox";
113 float bgColor[3] = { 0, 0, 0 };
114 bool fullScreen = false;
115 bool isWindowFullscreen = false;
116 std::string msaaSamples = "1";
117
118 // keyframe details window
119 std::unordered_map<float*, int> floatPointerToKeyframeNo;
121 };
122}
123}
Main API for chronos. Any applications should include this file.
int getKeyframeNo(float *valuePointer)
Chronos::Manager::Manager * manager
Chronos::Engine::TextParams textDetailsTextParams
void keyframeCheckbox(float *valuePointer, std::string name)
bool doesKeyframeExist(float *valuePointer)
std::unordered_map< float *, int > floatPointerToKeyframeNo
Chronos::Manager::ShapeParams shapeDetailsShapeParams
Chronos::Engine::TextParams newTextParams
Chronos::Manager::ShapeParams newShapeParams
void init(Chronos::Manager::Manager *manager)
The main manager of chronos.
Definition chronos.hpp:109
Parameters for rendering text.
Parameters for creating a shape(any)