Merge branch 'Eknous-P/welcomescr'
This commit is contained in:
commit
39e049145a
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -4705,6 +4705,7 @@ bool FurnaceGUI::loop() {
|
|||
if (ImGui::MenuItem(_("debug menu"),BIND_FOR(GUI_ACTION_WINDOW_DEBUG))) debugOpen=!debugOpen;
|
||||
if (ImGui::MenuItem(_("inspector"))) inspectorOpen=!inspectorOpen;
|
||||
if (ImGui::MenuItem(_("panic"),BIND_FOR(GUI_ACTION_PANIC))) e->syncReset();
|
||||
if (ImGui::MenuItem(_("welcome screen"))) tutorial.protoWelcome=false;
|
||||
if (ImGui::MenuItem(_("about..."),BIND_FOR(GUI_ACTION_WINDOW_ABOUT))) {
|
||||
aboutOpen=true;
|
||||
aboutScroll=0;
|
||||
|
|
|
@ -2281,6 +2281,7 @@ class FurnaceGUI {
|
|||
bool introPlayed;
|
||||
bool protoWelcome;
|
||||
bool importedMOD, importedS3M, importedXM, importedIT;
|
||||
double popupTimer;
|
||||
Tutorial():
|
||||
#ifdef SUPPORT_XP
|
||||
introPlayed(true),
|
||||
|
@ -2291,7 +2292,8 @@ class FurnaceGUI {
|
|||
importedMOD(false),
|
||||
importedS3M(false),
|
||||
importedXM(false),
|
||||
importedIT(false) {
|
||||
importedIT(false),
|
||||
popupTimer(10.0f) {
|
||||
}
|
||||
} tutorial;
|
||||
|
||||
|
|
|
@ -31,6 +31,24 @@
|
|||
#include <dirent.h>
|
||||
#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); \
|
||||
ImGui::SameLine();\
|
||||
ImGui::Text(ICON_FA_CLIPBOARD);\
|
||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_DelayShort)) ImGui::SetTooltip("click to copy");\
|
||||
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,
|
||||
CV_PLAYER,
|
||||
|
@ -684,15 +702,23 @@ void FurnaceGUI::drawTutorial() {
|
|||
"- click on the Orders matrix to change the patterns of a channel (left click increases; right click decreases)"
|
||||
));
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::TextWrapped(_(
|
||||
"if you are new to trackers, you may check the quick start guide:"
|
||||
));
|
||||
CLICK_TO_OPEN("https://github.com/tildearrow/furnace/blob/master/doc/1-intro/quickstart.md")
|
||||
ImGui::TextWrapped(_(
|
||||
"if you need help, you may:\n"
|
||||
"- read the manual (a file called manual.pdf)\n"
|
||||
"- ask for help in Discussions (https://github.com/tildearrow/furnace/discussions)"
|
||||
"- ask for help in Discussions"
|
||||
));
|
||||
CLICK_TO_OPEN("https://github.com/tildearrow/furnace/discussions")
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::TextWrapped(_("if you find any issues, be sure to report them! the issue tracker is here: https://github.com/tildearrow/furnace/issues"));
|
||||
ImGui::TextWrapped(_("if you find any issues, be sure to report them! the issue tracker is here:"));
|
||||
CLICK_TO_OPEN("https://github.com/tildearrow/furnace/issues")
|
||||
|
||||
if (ImGui::Button(_("OK"))) {
|
||||
tutorial.protoWelcome=true;
|
||||
|
@ -704,6 +730,18 @@ void FurnaceGUI::drawTutorial() {
|
|||
(canvasW-ImGui::GetWindowSize().x)*0.5,
|
||||
(canvasH-ImGui::GetWindowSize().y)*0.5
|
||||
));
|
||||
|
||||
if (tutorial.popupTimer<2.0f) {
|
||||
ImDrawList* dl=ImGui::GetForegroundDrawList();
|
||||
const ImVec2 winPos=ImGui::GetWindowPos();
|
||||
const ImVec2 txtSize=ImGui::CalcTextSize("copied!");
|
||||
const ImVec2 winSize=ImGui::GetWindowSize();
|
||||
dl->AddText(ImVec2(
|
||||
winPos.x+(winSize.x-txtSize.x)/2,
|
||||
winPos.y+(winSize.y-txtSize.y*2)
|
||||
),ImGui::ColorConvertFloat4ToU32(uiColors[GUI_COLOR_TOGGLE_ON]),"copied!");
|
||||
tutorial.popupTimer+=ImGui::GetIO().DeltaTime;
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue