MCPcopy Create free account
hub / github.com/dfranx/SHADERed / CodeEditorUI

Method CodeEditorUI

src/SHADERed/UI/CodeEditorUI.cpp:35–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34namespace ed {
35 CodeEditorUI::CodeEditorUI(GUIManager* ui, ed::InterfaceManager* objects, const std::string& name, bool visible)
36 : UIView(ui, objects, name, visible)
37 , m_selectedItem(-1)
38 , m_trackUpdatesNeeded(0)
39 {
40 Settings& sets = Settings::Instance();
41
42 if (std::filesystem::exists(sets.Editor.Font))
43 m_font = ImGui::GetIO().Fonts->AddFontFromFileTTF(sets.Editor.Font, sets.Editor.FontSize);
44 else {
45 m_font = ImGui::GetIO().Fonts->AddFontDefault();
46 Logger::Get().Log("Failed to load code editor font", true);
47 }
48
49 m_fontFilename = sets.Editor.Font;
50 m_fontSize = sets.Editor.FontSize;
51 m_fontNeedsUpdate = false;
52 m_savePopupOpen = -1;
53 m_focusWindow = false;
54 m_trackFileChanges = false;
55 m_trackThread = nullptr;
56 m_contentChanged = false;
57
58 RequestedProjectSave = false;
59
60 m_setupShortcuts();
61 }
62 CodeEditorUI::~CodeEditorUI()
63 {
64 delete m_trackThread;

Callers

nothing calls this directly

Calls 2

InstanceClass · 0.85
LogMethod · 0.80

Tested by

no test coverage detected