summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chat.cpp14
-rw-r--r--src/gui/guiChatConsole.cpp1
-rw-r--r--src/gui/guiChatConsole.h2
3 files changed, 3 insertions, 14 deletions
diff --git a/src/chat.cpp b/src/chat.cpp
index a67371441..5a8afa908 100644
--- a/src/chat.cpp
+++ b/src/chat.cpp
@@ -37,6 +37,7 @@ ChatBuffer::ChatBuffer(u32 scrollback):
if (m_scrollback == 0)
m_scrollback = 1;
m_empty_formatted_line.first = true;
+
m_cache_clickable_chat_weblinks = g_settings->getBool("clickable_chat_weblinks");
if(m_cache_clickable_chat_weblinks)
{
@@ -338,7 +339,7 @@ u32 ChatBuffer::formatChatLine(const ChatLine& line, u32 cols,
// remaining_in_{in,out}put. Try to end the fragment
// on a word boundary.
u32 frag_length = 1, space_pos = 0;
-
+
if(!m_cache_clickable_chat_weblinks)
{
while (frag_length < remaining_in_input &&
@@ -440,17 +441,6 @@ u32 ChatBuffer::formatChatLine(const ChatLine& line, u32 cols,
next_frags.push_back(temp_frag);
in_pos += frag_length;
remaining_in_output -= std::min(frag_length, remaining_in_output);
-
- /*
- std::cout << "----------" << std::endl;
- std::cout << "http_pos = " << http_pos << std::endl;
- std::cout << "space_pos = " << space_pos << std::endl;
- std::cout << "frag: '" << temp_frag.text.size() << "'" << std::endl;
- std::cout << "in_pos: '" << in_pos << std::endl;
- std::cout << "remain: '" << line.text.substr(in_pos).size() << "'" << std::endl;
- std::cout << "remn in in: '" << remaining_in_input << "'" << std::endl;
- std::cout << "remn in out: '" << remaining_in_output << "'" << std::endl;
- */
}
// handled for fragments individually
text_processing = false;
diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp
index 08d26efc2..527a28bdb 100644
--- a/src/gui/guiChatConsole.cpp
+++ b/src/gui/guiChatConsole.cpp
@@ -334,7 +334,6 @@ void GUIChatConsole::drawText()
#if USE_FREETYPE
if (m_font->getType() == irr::gui::EGFT_CUSTOM) {
-
// Draw colored text if FreeType is enabled
irr::gui::CGUITTFont *tmp = dynamic_cast<irr::gui::CGUITTFont *>(m_font);
tmp->draw(
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