From c9a058fdd9b3fc87b3e33a8ab3ad54d4a352fddd Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 28 May 2025 14:44:24 +0200 Subject: [PATCH] Formspec: remove gotText(wstr) remains These functions are now unused (no caller). --- src/client/game_formspec.cpp | 10 ---------- src/gui/guiEngine.cpp | 6 ------ src/gui/guiEngine.h | 6 ------ 3 files changed, 22 deletions(-) diff --git a/src/client/game_formspec.cpp b/src/client/game_formspec.cpp index dc51247b0..3d8dc6fc8 100644 --- a/src/client/game_formspec.cpp +++ b/src/client/game_formspec.cpp @@ -31,16 +31,6 @@ struct TextDestNodeMetadata : public TextDest m_p = p; m_client = client; } - // This is deprecated I guess? -celeron55 - void gotText(const std::wstring &text) - { - std::string ntext = wide_to_utf8(text); - infostream << "Submitting 'text' field of node at (" << m_p.X << "," - << m_p.Y << "," << m_p.Z << "): " << ntext << std::endl; - StringMap fields; - fields["text"] = ntext; - m_client->sendNodemetaFields(m_p, "", fields); - } void gotText(const StringMap &fields) { m_client->sendNodemetaFields(m_p, "", fields); diff --git a/src/gui/guiEngine.cpp b/src/gui/guiEngine.cpp index b31f12ef9..0ec0d7a76 100644 --- a/src/gui/guiEngine.cpp +++ b/src/gui/guiEngine.cpp @@ -40,12 +40,6 @@ void TextDestGuiEngine::gotText(const StringMap &fields) m_engine->getScriptIface()->handleMainMenuButtons(fields); } -/******************************************************************************/ -void TextDestGuiEngine::gotText(const std::wstring &text) -{ - m_engine->getScriptIface()->handleMainMenuEvent(wide_to_utf8(text)); -} - /******************************************************************************/ MenuTextureSource::~MenuTextureSource() { diff --git a/src/gui/guiEngine.h b/src/gui/guiEngine.h index 5c95e9a4c..f4b22f3c2 100644 --- a/src/gui/guiEngine.h +++ b/src/gui/guiEngine.h @@ -61,12 +61,6 @@ public: */ void gotText(const StringMap &fields); - /** - * receive text/events transmitted by guiFormSpecMenu - * @param text textual representation of event - */ - void gotText(const std::wstring &text); - private: /** target to transmit data to */ GUIEngine *m_engine = nullptr;