diff --git a/Navigator/src/Navigator/Editor/EditorLayer.cpp b/Navigator/src/Navigator/Editor/EditorLayer.cpp index d5d39a8..80cebc4 100644 --- a/Navigator/src/Navigator/Editor/EditorLayer.cpp +++ b/Navigator/src/Navigator/Editor/EditorLayer.cpp @@ -163,23 +163,23 @@ namespace Navigator { auto& params = gram.second->GetParameters(); if (ImGui::TreeNode(params.name.c_str())) { - ImGui::BulletText("X Parameter: %s", params.x_par.c_str()); + ImGui::BulletText(("X Parameter: "+params.x_par).c_str()); ImGui::BulletText("X Bins: %d X Min: %f X Max: %f", params.nbins_x, params.min_x, params.max_x); if (params.y_par != "None") { - ImGui::BulletText("Y Parameter: %s", params.y_par.c_str()); + ImGui::BulletText(("Y Parameter: "+params.y_par).c_str()); ImGui::BulletText("Y Bins: %d Y Min: %f Y Max: %f", params.nbins_y, params.min_y, params.max_y); } if(params.cutsDrawnUpon.size() != 0 && ImGui::TreeNode("Cuts Drawn")) { for(auto& cut : params.cutsDrawnUpon) - ImGui::BulletText("%s", cut.c_str()); + ImGui::BulletText(cut.c_str()); ImGui::TreePop(); } if(params.cutsAppliedTo.size() != 0 && ImGui::TreeNode("Cuts Applied")) { for(auto& cut : params.cutsAppliedTo) - ImGui::BulletText("%s", cut.c_str()); + ImGui::BulletText(cut.c_str()); ImGui::TreePop(); } ImGui::TreePop(); @@ -195,9 +195,9 @@ namespace Navigator { auto& params = cut.second->GetCutParams(); if(ImGui::TreeNode(params.name.c_str())) { - ImGui::BulletText("X Parameter: %s", params.x_par.c_str()); + ImGui::BulletText(("X Parameter: "+params.x_par).c_str()); if(params.y_par != "None") - ImGui::BulletText("Y Parameter: %s", params.y_par.c_str()); + ImGui::BulletText(("Y Parameter: "+params.y_par).c_str()); ImGui::TreePop(); } } diff --git a/Navigator/src/Navigator/Editor/FileDialog.cpp b/Navigator/src/Navigator/Editor/FileDialog.cpp index 64f507c..0dc9667 100644 --- a/Navigator/src/Navigator/Editor/FileDialog.cpp +++ b/Navigator/src/Navigator/Editor/FileDialog.cpp @@ -36,9 +36,9 @@ namespace Navigator { std::string text = ""; if (ImGui::BeginPopupModal(m_openFileName.c_str())) { - ImGui::Text("Current Directory: %s", m_currentPath.lexically_normal().string().c_str()); + ImGui::Text(("Current Directory: " + m_currentPath.lexically_normal().string()).c_str()); ImGui::SameLine(); - ImGui::Text("Extension Filter: %s", ext.c_str()); + ImGui::Text(("Extension Filter: "+ext).c_str()); ImGui::InputText("Selected", &m_selectedItem); if (ImGui::Button("Ok")) { @@ -111,9 +111,9 @@ namespace Navigator { std::string text = ""; if (ImGui::BeginPopupModal(m_saveFileName.c_str())) { - ImGui::Text("Current Directory: %s", m_currentPath.lexically_normal().string().c_str()); + ImGui::Text(("Current Directory: "+m_currentPath.lexically_normal().string()).c_str()); ImGui::SameLine(); - ImGui::Text("Extension Filter: %s", ext.c_str()); + ImGui::Text(("Extension Filter: "+ext).c_str()); ImGui::InputText("Selected", &m_selectedItem); if (ImGui::Button("Ok")) { @@ -184,7 +184,7 @@ namespace Navigator { std::string text = ""; if (ImGui::BeginPopupModal(m_openDirName.c_str())) { - ImGui::Text("Current Directory: %s", m_currentPath.lexically_normal().string().c_str()); + ImGui::Text(("Current Directory: "+m_currentPath.lexically_normal().string()).c_str()); ImGui::InputText("Selected", &m_selectedItem); if (ImGui::Button("Ok")) { diff --git a/Navigator/src/Navigator/Editor/SourceDialog.cpp b/Navigator/src/Navigator/Editor/SourceDialog.cpp index 735af20..719a393 100644 --- a/Navigator/src/Navigator/Editor/SourceDialog.cpp +++ b/Navigator/src/Navigator/Editor/SourceDialog.cpp @@ -9,7 +9,7 @@ namespace Navigator { SourceDialog::SourceDialog() : - m_openFlag(false), m_chosenWindow(2000000) + m_openFlag(false), m_chosenPort("51489"), m_chosenWindow(2000000) { } @@ -30,6 +30,7 @@ namespace Navigator { m_openFlag = false; m_chosenType = DataSource::SourceType::None; m_chosenLocation = ""; + m_chosenPort = "51489"; m_chosenWindow = 2000000; ImGui::OpenPopup("Attach Source"); } @@ -50,6 +51,7 @@ namespace Navigator { if (m_chosenType == DataSource::SourceType::CompassOnline) { ImGui::InputText("Hostname", &m_chosenLocation); + ImGui::InputText("Port", &m_chosenPort); } else if (m_chosenType == DataSource::SourceType::CompassOffline) { @@ -67,7 +69,7 @@ namespace Navigator { if (ImGui::Button("Ok")) { - PhysicsStartEvent event(m_chosenLocation, m_chosenType, m_chosenWindow); + PhysicsStartEvent event(m_chosenLocation, m_chosenType, m_chosenWindow, m_chosenPort); Application::Get().OnEvent(event); ImGui::CloseCurrentPopup(); } diff --git a/Navigator/src/Navigator/Editor/SourceDialog.h b/Navigator/src/Navigator/Editor/SourceDialog.h index c8da5d7..183bc05 100644 --- a/Navigator/src/Navigator/Editor/SourceDialog.h +++ b/Navigator/src/Navigator/Editor/SourceDialog.h @@ -19,6 +19,7 @@ namespace Navigator { bool m_openFlag; DataSource::SourceType m_chosenType; std::string m_chosenLocation; + std::string m_chosenPort; FileDialog m_fileDialog; int m_chosenWindow; }; diff --git a/Navigator/src/Navigator/Editor/SpectrumPanel.cpp b/Navigator/src/Navigator/Editor/SpectrumPanel.cpp index aa3d6d8..045b330 100644 --- a/Navigator/src/Navigator/Editor/SpectrumPanel.cpp +++ b/Navigator/src/Navigator/Editor/SpectrumPanel.cpp @@ -37,8 +37,8 @@ namespace Navigator { m_newCutParams.x_par = zoomed_params.x_par; m_newCutParams.y_par = zoomed_params.y_par; ImGui::InputText("Cut Name", &m_newCutParams.name); - ImGui::BulletText("X Parameter: %s", m_newCutParams.x_par.c_str()); - ImGui::BulletText("Y Parameter: %s", m_newCutParams.y_par.c_str()); + ImGui::BulletText(("X Parameter: "+m_newCutParams.x_par).c_str()); + ImGui::BulletText(("Y Parameter: "+m_newCutParams.y_par).c_str()); if(ImGui::Button("Accept & Draw")) { m_cutModeFlag = true;