add Assemble reloading

This commit is contained in:
2025-10-26 13:40:19 +08:00
parent e8dec2e2d3
commit 477d6b9ffe
5 changed files with 43 additions and 3 deletions

View File

@ -14,6 +14,7 @@
#include <Hazel/Utils/PlatformUtils.h>
#include "imgui_internal.h"
#include "Hazel/Scripting/ScriptEngine.h"
namespace Hazel
@ -280,8 +281,18 @@ namespace Hazel
if (ImGui::MenuItem("Save As...", "Ctrl+Shift+S"))
SaveSceneAs();
if (ImGui::BeginMenu("Script"))
{
if (ImGui::MenuItem("Reload Script", "Ctrl+R"))
ScriptEngine::ReloadAssemble();
ImGui::EndMenu();
}
ImGui::Separator();
if (ImGui::MenuItem("Exit")) { Hazel::Application::Get().Close(); }
if (ImGui::MenuItem("Exit"))
{
Application::Get().Close();
}
ImGui::EndMenu();
}
@ -636,6 +647,8 @@ namespace Hazel
NewScene();
else if (Input::IsKeyPressed(KeyCode::D))
OnDuplicateEntity();
else if (Input::IsKeyPressed(KeyCode::R))
ScriptEngine::ReloadAssemble();
}
} else
{