2020-09-25 12:25:36 +00:00
|
|
|
#include <gui/dialogs/credits.h>
|
|
|
|
#include <imgui.h>
|
|
|
|
#include <gui/icons.h>
|
2020-11-30 20:17:36 +00:00
|
|
|
#include <gui/style.h>
|
2020-10-07 20:44:54 +00:00
|
|
|
#include <config.h>
|
2020-12-22 17:42:30 +00:00
|
|
|
#include <credits.h>
|
|
|
|
#include <version.h>
|
2020-09-25 12:25:36 +00:00
|
|
|
|
|
|
|
namespace credits {
|
|
|
|
ImFont* bigFont;
|
|
|
|
|
|
|
|
void init() {
|
2020-11-30 20:17:36 +00:00
|
|
|
|
2020-09-25 12:25:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void show() {
|
|
|
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(20.0f, 20.0f));
|
|
|
|
ImGui::OpenPopup("Credits");
|
|
|
|
ImGui::BeginPopupModal("Credits", NULL, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove);
|
|
|
|
|
2020-11-30 20:17:36 +00:00
|
|
|
ImGui::PushFont(style::hugeFont);
|
2020-09-25 12:25:36 +00:00
|
|
|
ImGui::Text("SDR++ ");
|
|
|
|
ImGui::PopFont();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Image(icons::LOGO, ImVec2(128, 128));
|
|
|
|
ImGui::Spacing();
|
|
|
|
ImGui::Spacing();
|
|
|
|
ImGui::Spacing();
|
|
|
|
|
|
|
|
ImGui::Text("This software is brought to you by\n\n");
|
|
|
|
|
|
|
|
ImGui::Columns(3, "CreditColumns", true);
|
|
|
|
|
|
|
|
ImGui::Text("Contributors");
|
2020-12-22 17:42:30 +00:00
|
|
|
for (int i = 0; i < sdrpp_credits::contributorCount; i++) {
|
|
|
|
ImGui::BulletText(sdrpp_credits::contributors[i]);
|
|
|
|
}
|
|
|
|
|
2020-09-25 12:25:36 +00:00
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::Text("Libraries");
|
2020-12-22 17:42:30 +00:00
|
|
|
for (int i = 0; i < sdrpp_credits::libraryCount; i++) {
|
|
|
|
ImGui::BulletText(sdrpp_credits::libraries[i]);
|
|
|
|
}
|
2020-09-25 12:25:36 +00:00
|
|
|
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::Text("Patrons");
|
2020-12-22 17:42:30 +00:00
|
|
|
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);
|
2020-09-25 12:25:36 +00:00
|
|
|
|
|
|
|
ImGui::EndPopup();
|
|
|
|
ImGui::PopStyleVar(1);
|
|
|
|
}
|
|
|
|
}
|