diff --git a/core/src/core.cpp b/core/src/core.cpp index a6533600..a567ad3b 100644 --- a/core/src/core.cpp +++ b/core/src/core.cpp @@ -118,7 +118,7 @@ int sdrpp_main(int argc, char *argv[]) { defConfig["windowSize"]["w"] = 1280; // Load config - spdlog::info("Loading config {0}"); + spdlog::info("Loading config"); core::configManager.setPath(options::opts.root + "/config.json"); core::configManager.load(defConfig); core::configManager.enableAutoSave(); diff --git a/core/src/credits.cpp b/core/src/credits.cpp new file mode 100644 index 00000000..2e8f581d --- /dev/null +++ b/core/src/credits.cpp @@ -0,0 +1,30 @@ +#include + +namespace sdrpp_credits { + const char* contributors[] = { + "Ryzerth (Author)", + "aosync", + "Alexsey Shestacov", + "Benjamin Kyd", + "Tobias Mädel", + "Raov", + "Howard0su" + }; + + const char* libraries[] = { + "Dear ImGui (ocornut)", + "json (nlohmann)", + "portaudio (P.A. comm.)", + "SoapySDR (PothosWare)", + "spdlog (gabime)", + }; + + const char* patrons[] = { + "SignalsEverywhere", + "Lee Donaghy" + }; + + const int contributorCount = sizeof(contributors) / sizeof(char*); + const int libraryCount = sizeof(libraries) / sizeof(char*); + const int patronCount = sizeof(patrons) / sizeof(char*); +} \ No newline at end of file diff --git a/core/src/credits.h b/core/src/credits.h new file mode 100644 index 00000000..a31dcc8c --- /dev/null +++ b/core/src/credits.h @@ -0,0 +1,11 @@ +#pragma once +#include + +namespace sdrpp_credits { + SDRPP_EXPORT const char* contributors[]; + SDRPP_EXPORT const char* libraries[]; + SDRPP_EXPORT const char* patrons[]; + SDRPP_EXPORT const int contributorCount; + SDRPP_EXPORT const int libraryCount; + SDRPP_EXPORT const int patronCount; +} \ No newline at end of file diff --git a/core/src/gui/dialogs/credits.cpp b/core/src/gui/dialogs/credits.cpp index d1f5d1bd..3ebbdae3 100644 --- a/core/src/gui/dialogs/credits.cpp +++ b/core/src/gui/dialogs/credits.cpp @@ -3,6 +3,8 @@ #include #include #include +#include +#include namespace credits { ImFont* bigFont; @@ -29,30 +31,29 @@ namespace credits { ImGui::Columns(3, "CreditColumns", true); - // Contributors ImGui::Text("Contributors"); - ImGui::BulletText("Ryzerth (Creator)"); - ImGui::BulletText("Alexsey Shestacov"); - ImGui::BulletText("aosync"); - ImGui::BulletText("Benjamin Kyd"); - ImGui::BulletText("Tobias Mädel"); - ImGui::BulletText("Raov"); - ImGui::BulletText("Howard0su"); + for (int i = 0; i < sdrpp_credits::contributorCount; i++) { + ImGui::BulletText(sdrpp_credits::contributors[i]); + } - // Libraries ImGui::NextColumn(); ImGui::Text("Libraries"); - ImGui::BulletText("SoapySDR (PothosWare)"); - ImGui::BulletText("Dear ImGui (ocornut)"); - ImGui::BulletText("spdlog (gabime)"); - ImGui::BulletText("json (nlohmann)"); - ImGui::BulletText("portaudio (PA Comm.)"); + for (int i = 0; i < sdrpp_credits::libraryCount; i++) { + ImGui::BulletText(sdrpp_credits::libraries[i]); + } - // Patrons ImGui::NextColumn(); ImGui::Text("Patrons"); - ImGui::BulletText("SignalsEverywhere"); - ImGui::BulletText("Lee Donaghy"); + for (int i = 0; i < sdrpp_credits::patronCount; i++) { + ImGui::BulletText(sdrpp_credits::patrons[i]); + } + + ImGui::Columns(1, "CreditColumnsEnd", true); + + ImGui::Spacing(); + ImGui::Spacing(); + ImGui::Spacing(); + ImGui::Text("SDR++ v" VERSION_STR); ImGui::EndPopup(); ImGui::PopStyleVar(1); diff --git a/core/src/gui/dialogs/loading_screen.cpp b/core/src/gui/dialogs/loading_screen.cpp index 48220714..1ad7eaf8 100644 --- a/core/src/gui/dialogs/loading_screen.cpp +++ b/core/src/gui/dialogs/loading_screen.cpp @@ -6,6 +6,7 @@ #include "imgui_impl_opengl3.h" #include #include +#include namespace LoadingScreen { GLFWwindow* _win; @@ -41,30 +42,22 @@ namespace LoadingScreen { ImGui::Columns(3, "CreditColumns", true); - // Contributors ImGui::Text("Contributors"); - ImGui::BulletText("Ryzerth (Creator)"); - ImGui::BulletText("Alexsey Shestacov"); - ImGui::BulletText("aosync"); - ImGui::BulletText("Benjamin Kyd"); - ImGui::BulletText("Tobias Mädel"); - ImGui::BulletText("Raov"); - ImGui::BulletText("Howard0su"); + for (int i = 0; i < sdrpp_credits::contributorCount; i++) { + ImGui::BulletText(sdrpp_credits::contributors[i]); + } - // Libraries ImGui::NextColumn(); ImGui::Text("Libraries"); - ImGui::BulletText("SoapySDR (PothosWare)"); - ImGui::BulletText("Dear ImGui (ocornut)"); - ImGui::BulletText("spdlog (gabime)"); - ImGui::BulletText("json (nlohmann)"); - ImGui::BulletText("portaudio (PA Comm.)"); + for (int i = 0; i < sdrpp_credits::libraryCount; i++) { + ImGui::BulletText(sdrpp_credits::libraries[i]); + } - // Patrons ImGui::NextColumn(); ImGui::Text("Patrons"); - ImGui::BulletText("SignalsEverywhere"); - ImGui::BulletText("Lee Donaghy"); + for (int i = 0; i < sdrpp_credits::patronCount; i++) { + ImGui::BulletText(sdrpp_credits::patrons[i]); + } ImGui::Columns(1, "CreditColumnsEnd", true);