From b6c8761e108eade0d1451580fbacf1e3d3f6a957 Mon Sep 17 00:00:00 2001 From: pecksin Date: Thu, 18 Mar 2021 16:47:36 -0400 Subject: re-apply everything manually because git --- src/gui/guiChatConsole.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/guiChatConsole.h') diff --git a/src/gui/guiChatConsole.h b/src/gui/guiChatConsole.h index 896342ab0..501bf50cb 100644 --- a/src/gui/guiChatConsole.h +++ b/src/gui/guiChatConsole.h @@ -124,4 +124,7 @@ private: // font gui::IGUIFont *m_font = nullptr; v2u32 m_fontsize; + + // Enable clickable chat weblinks + bool m_cache_clickable_chat_weblinks; }; -- cgit v1.2.3 From 038a317c213db41227beaa014100dc43b46e392c Mon Sep 17 00:00:00 2001 From: pecksin Date: Fri, 19 Mar 2021 16:25:44 -0400 Subject: user-configurable 'ctrl' keys for ctrl-leftclick in chat weblinks --- src/gui/guiChatConsole.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/guiChatConsole.h') diff --git a/src/gui/guiChatConsole.h b/src/gui/guiChatConsole.h index 501bf50cb..058b78f28 100644 --- a/src/gui/guiChatConsole.h +++ b/src/gui/guiChatConsole.h @@ -82,6 +82,10 @@ private: void drawText(); void drawPrompt(); + // Parse conf and populate "ctrl" keys for clickable chat + int setupChatClickCtrlKeys(std::string inputline); + bool isInCtrlKeys(const irr::EKEY_CODE& kc); + private: ChatBackend* m_chat_backend; Client* m_client; @@ -127,4 +131,6 @@ private: // Enable clickable chat weblinks bool m_cache_clickable_chat_weblinks; + // Set of "control" keys for weblink mouseclicks + std::vector m_cache_chat_weblink_ctrl_keys; }; -- cgit v1.2.3 From 7054232044c1b0ccf50e80d40e5d3d8a37062415 Mon Sep 17 00:00:00 2001 From: pecksin Date: Mon, 22 Mar 2021 17:21:28 -0400 Subject: minor cleanup --- src/gui/guiChatConsole.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/guiChatConsole.h') diff --git a/src/gui/guiChatConsole.h b/src/gui/guiChatConsole.h index 058b78f28..0618f2956 100644 --- a/src/gui/guiChatConsole.h +++ b/src/gui/guiChatConsole.h @@ -128,7 +128,7 @@ private: // font gui::IGUIFont *m_font = nullptr; v2u32 m_fontsize; - + // Enable clickable chat weblinks bool m_cache_clickable_chat_weblinks; // Set of "control" keys for weblink mouseclicks -- cgit v1.2.3 From 7e8e3153e5227eb9b35ed2379efb54d17ba9aeae Mon Sep 17 00:00:00 2001 From: pecksin Date: Tue, 23 Mar 2021 18:18:44 -0400 Subject: move middleClick() into guiChatConsole.cpp where it belongs --- src/gui/guiChatConsole.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/guiChatConsole.h') diff --git a/src/gui/guiChatConsole.h b/src/gui/guiChatConsole.h index 0618f2956..169fb7eb7 100644 --- a/src/gui/guiChatConsole.h +++ b/src/gui/guiChatConsole.h @@ -82,9 +82,11 @@ private: void drawText(); void drawPrompt(); - // Parse conf and populate "ctrl" keys for clickable chat + // Clickable weblink stuff int setupChatClickCtrlKeys(std::string inputline); bool isInCtrlKeys(const irr::EKEY_CODE& kc); + // If clicked fragment has a web url, send it to the system default web browser + void middleClick(s32 col, s32 row); private: ChatBackend* m_chat_backend; -- cgit v1.2.3