mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
NK-100 - 'Open In' button
This commit is contained in:
@@ -426,9 +426,16 @@ void EditorSelectionPanel::DrawWrenScriptPanel(Ref<Nuake::WrenScript> wrenFile)
|
||||
{
|
||||
auto filePath = wrenFile->GetFile()->GetAbsolutePath();
|
||||
std::string fileContent = Nuake::FileSystem::ReadFile(filePath, true);
|
||||
|
||||
|
||||
ImGui::Text("Content");
|
||||
ImGui::SameLine(ImGui::GetWindowWidth()-90);
|
||||
if(ImGui::Button("Open In..."))
|
||||
{
|
||||
Nuake::OS::OpenIn(filePath);
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + ImGui::GetWindowWidth());
|
||||
ImGui::Text(fileContent.c_str(), ImGui::GetWindowWidth());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user