-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEditor.cs
More file actions
41 lines (32 loc) · 1.11 KB
/
Editor.cs
File metadata and controls
41 lines (32 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Text.Json;
using ImGuiNET;
using Raylib_cs;
using SharpEngine.Core;
using SharpEngine.Core.Manager;
using SharpEngine.Core.Math;
using SharpEngine.Core.Renderer;
using SharpEngine.Core.Utils;
namespace SharpEngine.Editor;
public class Editor: Window
{
private RenderTexture2D _renderTexture;
public Editor(): base(1800, 900, "SharpEngine Editor", Core.Utils.Color.Black, null, true, true, true)
{
if (!Path.Exists("Projects"))
Directory.CreateDirectory("Projects");
Raylib.SetConfigFlags(ConfigFlags.ResizableWindow);
ImGui.GetIO().ConfigFlags |= ImGuiConfigFlags.DockingEnable;
DebugManager.Log(LogLevel.LogInfo, "EDITOR: Loading...");
_renderTexture = Raylib.LoadRenderTexture(900, 600);
DebugManager.Log(LogLevel.LogInfo, "EDITOR: Loaded !");
AddScene(new Scene());
Run();
Unload();
}
public void Unload()
{
DebugManager.Log(LogLevel.LogInfo, "EDITOR: Unloading...");
Raylib.UnloadRenderTexture(_renderTexture);
DebugManager.Log(LogLevel.LogInfo, "EDITOR: Unloaded !");
}
}