Polyphase Game Engine
Loading...
Searching...
No Matches
ScriptEditorWindow.h
Go to the documentation of this file.
1#pragma once
2
3#if EDITOR
4
5#include <string>
6#include <vector>
7
8class ScriptEditorWindow
9{
10public:
11 void Init();
12 void Shutdown();
13 void DrawContent();
14
15 void OpenFile(const std::string& filePath);
16 bool HasUnsavedChanges() const;
17
18 // Toolbar actions
19 void DoNew();
20 void DoOpen();
21 void DoSave();
22 void DoSaveAs();
23 void DoCloseCurrentBuffer();
24
25private:
26 void* mEditor = nullptr; // Zep::ZepEditor_ImGui* (opaque, created on first OpenFile)
27 bool mInitialized = false;
28
29 void EnsureEditor();
30
31 // Recent files
32 std::vector<std::string> mRecentFiles;
33 static const size_t kMaxRecentFiles = 10;
34 void AddRecentFile(const std::string& filePath);
35 void LoadRecentFiles();
36 void SaveRecentFiles();
37 std::string GetRecentFilesPath() const;
38};
39
40ScriptEditorWindow* GetScriptEditorWindow();
41
42#endif
void Shutdown()
Definition Engine.cpp:916