From b99ad4ac784172cb2bdeb7eda5e806302a551150 Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Mon, 14 Aug 2023 01:18:13 -0400 Subject: [PATCH] Added documentation URL link in project launcher --- Editor/src/Windows/WelcomeWindow.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Editor/src/Windows/WelcomeWindow.cpp b/Editor/src/Windows/WelcomeWindow.cpp index 756b090a..b03b8c53 100644 --- a/Editor/src/Windows/WelcomeWindow.cpp +++ b/Editor/src/Windows/WelcomeWindow.cpp @@ -240,7 +240,7 @@ namespace Nuake { const ImVec2 buttonSize = ImVec2(ImGui::GetContentRegionAvail().x, buttonHeight); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 4.0f); - ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.2f, 0.5f)); + ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.14f, 0.5f)); const std::string buttonLabel = std::string(ICON_FA_FOLDER_PLUS) + " New Game Project..."; if (ImGui::Button(buttonLabel.c_str(), buttonSize)) { @@ -288,7 +288,7 @@ namespace Nuake if (SelectedProject != -1) { ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 4.0f); - ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.2f, 0.5f)); + ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.16f, 0.5f)); const std::string buttonLabelOpen = std::string(ICON_FA_FOLDER_OPEN) + " Load Selected Project"; if (ImGui::Button(buttonLabelOpen.c_str(), buttonSize) || ImGui::IsMouseDoubleClicked(0)) { @@ -300,6 +300,16 @@ namespace Nuake } ImGui::PopStyleVar(2); } + ImGui::Separator(); + + ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 4.0f); + ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.09f, 0.5f)); + const std::string buttonLabelDoc = std::string(ICON_FA_EXTERNAL_LINK_SQUARE_ALT) + " Documentation"; + if (ImGui::Button(buttonLabelDoc.c_str(), buttonSize)) + { + OS::OpenURL("https://nuake.readthedocs.io/en/latest/index.html"); + } + ImGui::PopStyleVar(2); } ImGui::EndChild();