From 0c16646b05500f98ee3097d3312a0412e13ef148 Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Mon, 23 Sep 2024 23:33:52 +0400 Subject: [PATCH] mobile button and... ugh --- src/gui/editControls.cpp | 4 ++++ src/gui/tutorial.cpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/editControls.cpp b/src/gui/editControls.cpp index 40269259e..eb0dedae5 100644 --- a/src/gui/editControls.cpp +++ b/src/gui/editControls.cpp @@ -620,6 +620,10 @@ void FurnaceGUI::drawMobileControls() { mobileMenuPos=0.0f; aboutOpen=true; } + ImGui::SameLine(); + if (ImGui::Button(_("WelcPopup"))) { + tutorial.protoWelcome=false; + } if (ImGui::Button(_("Switch to Desktop Mode"))) { toggleMobileUI(!mobileUI); } diff --git a/src/gui/tutorial.cpp b/src/gui/tutorial.cpp index 4c5158b76..2c752a63b 100644 --- a/src/gui/tutorial.cpp +++ b/src/gui/tutorial.cpp @@ -31,12 +31,13 @@ #include #endif +#ifndef IS_MOBILE #define CLICK_TO_OPEN(t) ImGui::TextColored(uiColors[GUI_COLOR_ACCENT_PRIMARY],t);\ if (ImGui::IsItemHovered()) {\ ImGui::SetTooltip("click to open");\ ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);\ }\ -if (ImGui::IsItemClicked()) SDL_OpenURL(t);\ +if (ImGui::IsItemClicked()) SDL_OpenURL(t); \ ImGui::SameLine();\ ImGui::Text(ICON_FA_CLIPBOARD);\ if (ImGui::IsItemHovered(ImGuiHoveredFlags_DelayShort)) ImGui::SetTooltip("click to copy");\ @@ -44,6 +45,9 @@ if (ImGui::IsItemClicked()) {\ ImGui::SetClipboardText(t);\ tutorial.popupTimer=0;\ } +#else +#define CLICK_TO_OPEN(t) ImGui::TextColored(uiColors[GUI_COLOR_ACCENT_PRIMARY],t); if (ImGui::IsItemClicked()) SDL_OpenURL(t); +#endif enum FurnaceCVObjectTypes { CV_NULL=0,