Merge pull request #34 from antopilo/feature/nk-113-open-wren-script-double-click

NK-113 - Open Wren Script File with Double Click
This commit is contained in:
émeryc
2023-07-18 10:29:26 -04:00
committed by GitHub
2 changed files with 14 additions and 1 deletions

View File

@@ -37,6 +37,16 @@ public:
}
component.Script = path;
// Double click on file
if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(0))
{
if(!component.Script.empty())
{
Nuake::OS::OpenIn(component.mWrenScript->GetFile()->GetAbsolutePath());
}
}
ImGui::TableNextColumn();
ComponentTableReset(component.Script, "");

View File

@@ -39,7 +39,10 @@ namespace Nuake
if (j.contains("Script"))
{
Script = j["Script"];
LoadScript(Script);
if(!Script.empty())
{
LoadScript(Script);
}
}
if (j.contains("mModule"))