Skip to content

Commit

Permalink
Add missing author. Refactor About window to more code readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariofv committed Dec 23, 2019
1 parent 0bb6c55 commit 0875400
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 120 deletions.
148 changes: 28 additions & 120 deletions Engine/UI/EngineUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,137 +423,45 @@ void EngineUI::ShowAboutWindow()
ImGui::Separator();


ImGui::Text("Authors:");
ImGui::SameLine();
ImGui::TextColored(ImVec4(0.0f, 1.0f, 1.0f, 1.0f), "Mario Fernandez Villalba");
ImGui::TextColored(ImVec4(0.0f, 1.0f, 1.0f, 1.0f), "Authors:");
ImGui::Text("Mario Fernandez Villalba");
ImGui::Text("Anabel Hernandez Barrera");


ImGui::Separator();


ImGui::TextColored(ImVec4(0.0f, 1.0f, 1.0f, 1.0f), "Libraries");

if (ImGui::MenuItem("SDL 2.0"))
{
ShellExecuteA(NULL, "open", "https://www.libsdl.org/", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("glew 2.1.0"))
{
ShellExecuteA(NULL, "open", "http://glew.sourceforge.net/", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("MathGeoLib 1.5"))
{
ShellExecuteA(NULL, "open", "https://github.com/juj/MathGeoLib", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("ImGui 1.73"))
{
ShellExecuteA(NULL, "open", "https://github.com/ocornut/imgui", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("DevIL 1.8"))
{
ShellExecuteA(NULL, "open", "http://openil.sourceforge.net/", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("assimp 5.0"))
{
ShellExecuteA(NULL, "open", "https://github.com/assimp/assimp", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("Font Awesome 5"))
{
ShellExecuteA(NULL, "open", "https://github.com/FortAwesome/Font-Awesome", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("Icon Font Cpp Headers"))
{
ShellExecuteA(NULL, "open", "https://github.com/juliettef/IconFontCppHeaders", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("PCG"))
{
ShellExecuteA(NULL, "open", "http://www.pcg-random.org/", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("rapidjson 1.1.0"))
{
ShellExecuteA(NULL, "open", "https://github.com/Tencent/rapidjson/", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("Debug Draw"))
{
ShellExecuteA(NULL, "open", "https://github.com/glampert/debug-draw", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

if (ImGui::MenuItem("par_shapes"))
{
ShellExecuteA(NULL, "open", "https://github.com/prideout/par/blob/master/par_shapes.h", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}

MenuURL("SDL 2.0", "https://www.libsdl.org/");
MenuURL("glew 2.1.0", "http://glew.sourceforge.net/");
MenuURL("MathGeoLib 1.5", "https://github.com/juj/MathGeoLib/");
MenuURL("ImGui 1.73", "https://github.com/ocornut/imgui/");
MenuURL("DevIL 1.8", "http://openil.sourceforge.net/");
MenuURL("assimp 5.0", "https://github.com/assimp/assimp/");
MenuURL("Font Awesome 5", "https://github.com/FortAwesome/Font-Awesome/");
MenuURL("Icon Font Cpp Headers", "https://github.com/juliettef/IconFontCppHeaders/");
MenuURL("PCG", "http://www.pcg-random.org/");
MenuURL("rapidjson 1.1.0", "https://github.com/Tencent/rapidjson/");
MenuURL("Debug Draw", "https://github.com/glampert/debug-draw/");
MenuURL("par_shapes", "https://github.com/prideout/par/blob/master/par_shapes.h");

ImGui::Separator();


if (ImGui::MenuItem("LICENSE"))
{
ShellExecuteA(NULL, "open", "https://github.com/mariofv/LittleOrionEngine/blob/master/LICENSE", NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}
MenuURL("LICENSE", "https://github.com/mariofv/LittleOrionEngine/blob/master/LICENSE");
ImGui::TextWrapped("Orion Engine is licensed under the MIT License, see LICENSE for more information.");
}
ImGui::End();
}

void EngineUI::MenuURL(const std::string& text, const std::string& link)
{
if (ImGui::MenuItem(text.c_str()))
{
ShellExecuteA(NULL, "open", link.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (ImGui::IsItemHovered())
{
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
}
}
1 change: 1 addition & 0 deletions Engine/UI/EngineUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class EngineUI

void ShowAboutWindow();

void MenuURL(const std::string& text, const std::string& link);

public:
#define MAIN_MENU_BAR_HEIGHT 19
Expand Down

0 comments on commit 0875400

Please sign in to comment.