-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathAboutWindow.cpp
More file actions
74 lines (65 loc) · 2.98 KB
/
AboutWindow.cpp
File metadata and controls
74 lines (65 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include "AboutWindow.h"
#include "IconsFontAwesome7.h"
#include "ProjectMGUI.h"
#include "SystemBrowser.h"
#include "ProjectMSDLApplication.h"
#include "ProjectMWrapper.h"
#include <imgui.h>
#include <Poco/Util/Application.h>
AboutWindow::AboutWindow(ProjectMGUI& gui)
: _gui(gui)
, _application(ProjectMSDLApplication::instance())
, _projectMWrapper(Poco::Util::Application::instance().getSubsystem<ProjectMWrapper>())
{
}
void AboutWindow::Show()
{
_visible = true;
}
void AboutWindow::Draw()
{
if (!_visible)
{
return;
}
ImGui::SetNextWindowSize(ImVec2(750, 600), ImGuiCond_FirstUseEver);
if (ImGui::Begin(ICON_FA_INFO " About the projectM SDL Frontend###About", &_visible, ImGuiWindowFlags_NoCollapse))
{
_gui.PushToastFont();
ImGui::TextUnformatted("projectM SDL Frontend");
_gui.PopFont();
ImGui::Dummy({.0f, 10.0f});
ImGui::Text("Version: %s", PROJECTMSDL_VERSION);
ImGui::Text("libprojectM: %s (built with %s)", _projectMWrapper.ProjectMRuntimeVersion().c_str(), _projectMWrapper.ProjectMBuildVersion().c_str());
ImGui::Dummy({.0f, 20.0f});
ImGui::TextUnformatted("Brought to you by the projectM Team and contributors!");
ImGui::Dummy({.0f, 10.0f});
ImGui::Separator();
ImGui::Dummy({.0f, 10.0f});
ImGui::TextWrapped("The projectM SDL frontend is open-source software licensed under the GNU General Public License, version 3.");
ImGui::Dummy({.0f, 10.0f});
ImGui::TextWrapped("Get the source code on GitHub or report an issue with the SDL frontend:");
if (ImGui::SmallButton(ICON_FA_ARROW_UP_RIGHT_FROM_SQUARE " https://github.com/projectM-visualizer/frontend-sdl-cpp"))
{
SystemBrowser::OpenURL("https://github.com/projectM-visualizer/frontend-sdl-cpp");
}
ImGui::Dummy({.0f, 10.0f});
if (ImGui::CollapsingHeader("Open-Source Software Used in this Application"))
{
ImGui::TextUnformatted("Used in projectM SDL:");
ImGui::BulletText("libprojectM by The projectM Team (GNU LGPL v2.1)");
ImGui::BulletText("Simple DirectMedia Layer 2 (SDL) (zlib License)");
ImGui::BulletText("Dear ImGui by Omar Cornut and contributors (MIT)");
ImGui::BulletText("The POCO C++ Framework by Applied Informatics GmbH (MIT)");
ImGui::BulletText("FreeType 2 (FreeType License / GNU GPL v2)");
ImGui::BulletText("FontAwesome Free Icons v7 (FontAwesome License / SIL OFL 1.1)");
ImGui::Dummy({.0f, 10.0f});
ImGui::TextUnformatted("Via libprojectM:");
ImGui::BulletText("projectm-eval by The projectM Team (MIT)");
ImGui::BulletText("SOIL2 by Martín Lucas Golini (MIT-0)");
ImGui::BulletText("hlslparser by Unknown Worlds Entertainment, Inc. (MIT)");
ImGui::BulletText("OpenGL Mathematics (GLM) by G-Truc Creation (The Happy Bunny License)");
}
}
ImGui::End();
}