mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-04 02:07:27 +00:00
GUI: release to open
This commit is contained in:
parent
39e049145a
commit
6f585bfce6
1 changed files with 15 additions and 13 deletions
|
@ -32,19 +32,21 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef IS_MOBILE
|
#ifndef IS_MOBILE
|
||||||
#define CLICK_TO_OPEN(t) ImGui::TextColored(uiColors[GUI_COLOR_ACCENT_PRIMARY],t);\
|
#define CLICK_TO_OPEN(t) ImGui::TextColored(uiColors[GUI_COLOR_ACCENT_PRIMARY],t); \
|
||||||
if (ImGui::IsItemHovered()) {\
|
if (ImGui::IsItemHovered()) { \
|
||||||
ImGui::SetTooltip("click to open");\
|
ImGui::SetTooltip("click to open"); \
|
||||||
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);\
|
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); \
|
||||||
}\
|
if (ImGui::IsMouseReleased(ImGuiMouseButton_Left)) { \
|
||||||
if (ImGui::IsItemClicked()) SDL_OpenURL(t); \
|
SDL_OpenURL(t); \
|
||||||
ImGui::SameLine();\
|
} \
|
||||||
ImGui::Text(ICON_FA_CLIPBOARD);\
|
} \
|
||||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_DelayShort)) ImGui::SetTooltip("click to copy");\
|
ImGui::SameLine(); \
|
||||||
if (ImGui::IsItemClicked()) {\
|
ImGui::Text(ICON_FA_CLIPBOARD); \
|
||||||
ImGui::SetClipboardText(t);\
|
if (ImGui::IsItemHovered(ImGuiHoveredFlags_DelayShort)) ImGui::SetTooltip("click to copy"); \
|
||||||
tutorial.popupTimer=0;\
|
if (ImGui::IsItemClicked()) { \
|
||||||
}
|
ImGui::SetClipboardText(t); \
|
||||||
|
tutorial.popupTimer=0; \
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#define CLICK_TO_OPEN(t) ImGui::TextColored(uiColors[GUI_COLOR_ACCENT_PRIMARY],t); if (ImGui::IsItemClicked()) SDL_OpenURL(t);
|
#define CLICK_TO_OPEN(t) ImGui::TextColored(uiColors[GUI_COLOR_ACCENT_PRIMARY],t); if (ImGui::IsItemClicked()) SDL_OpenURL(t);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue