Skip to content

Commit

Permalink
added better credit system
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryzerth committed Dec 22, 2020
1 parent 98b6e58 commit 4a86d60
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 37 deletions.
2 changes: 1 addition & 1 deletion core/src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
30 changes: 30 additions & 0 deletions core/src/credits.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <credits.h>

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*);
}
11 changes: 11 additions & 0 deletions core/src/credits.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once
#include <new_module.h>

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;
}
37 changes: 19 additions & 18 deletions core/src/gui/dialogs/credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <gui/icons.h>
#include <gui/style.h>
#include <config.h>
#include <credits.h>
#include <version.h>

namespace credits {
ImFont* bigFont;
Expand All @@ -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");

// Libraries
for (int i = 0; i < sdrpp_credits::contributorCount; i++) {
ImGui::BulletText(sdrpp_credits::contributors[i]);
}

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);
Expand Down
29 changes: 11 additions & 18 deletions core/src/gui/dialogs/loading_screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "imgui_impl_opengl3.h"
#include <gui/icons.h>
#include <gui/style.h>
#include <credits.h>

namespace LoadingScreen {
GLFWwindow* _win;
Expand Down Expand Up @@ -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");

// Libraries
for (int i = 0; i < sdrpp_credits::contributorCount; i++) {
ImGui::BulletText(sdrpp_credits::contributors[i]);
}

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);

Expand Down

0 comments on commit 4a86d60

Please sign in to comment.