From 5ff449d6c94d1d74d79ecc7032691818186cddc0 Mon Sep 17 00:00:00 2001 From: CodingJellyfish Date: Mon, 29 Apr 2024 10:06:47 +0800 Subject: [PATCH] Remove an unneeded method --- lib/irrlicht/include/IGUIEnvironment.h | 2 -- lib/irrlicht/source/Irrlicht/CGUIEnvironment.h | 2 -- src/guiengine/widgets/dynamic_ribbon_widget.cpp | 4 ++-- src/states_screens/online/networking_lobby.cpp | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/irrlicht/include/IGUIEnvironment.h b/lib/irrlicht/include/IGUIEnvironment.h index c5cd83a0b..84c409243 100644 --- a/lib/irrlicht/include/IGUIEnvironment.h +++ b/lib/irrlicht/include/IGUIEnvironment.h @@ -612,8 +612,6 @@ public: virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node) =0; virtual void removeHovered(IGUIElement* element) = 0; - - virtual bool setChildEnd(IGUIElement* end) = 0; }; diff --git a/lib/irrlicht/source/Irrlicht/CGUIEnvironment.h b/lib/irrlicht/source/Irrlicht/CGUIEnvironment.h index 3e5fef817..efe055f25 100644 --- a/lib/irrlicht/source/Irrlicht/CGUIEnvironment.h +++ b/lib/irrlicht/source/Irrlicht/CGUIEnvironment.h @@ -257,8 +257,6 @@ public: virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node); virtual void removeHovered(IGUIElement* element); - - virtual bool setChildEnd(IGUIElement* end) { return IGUIElement::setChildEnd(end); } private: IGUIElement* getNextElement(bool reverse=false, bool group=false); diff --git a/src/guiengine/widgets/dynamic_ribbon_widget.cpp b/src/guiengine/widgets/dynamic_ribbon_widget.cpp index 06fc9109e..b7af7ead8 100644 --- a/src/guiengine/widgets/dynamic_ribbon_widget.cpp +++ b/src/guiengine/widgets/dynamic_ribbon_widget.cpp @@ -197,11 +197,11 @@ void DynamicRibbonWidget::resize() for (unsigned i = 0; i < MAX_PLAYER_COUNT; i++) selected[i] = getSelectionIDString(i); Widget::resize(); - GUIEngine::getGUIEnv()->setChildEnd(m_left_widget->m_element); + GUIEngine::getGUIEnv()->getRootGUIElement()->setChildEnd(m_left_widget->m_element); updateForResizing(); buildInternalStructure(); updateItemDisplay(); - GUIEngine::getGUIEnv()->setChildEnd(NULL); + GUIEngine::getGUIEnv()->getRootGUIElement()->setChildEnd(NULL); for (unsigned i = 0; i < MAX_PLAYER_COUNT; i++) { if (!selected[i].empty()) diff --git a/src/states_screens/online/networking_lobby.cpp b/src/states_screens/online/networking_lobby.cpp index cf26751d6..217653c33 100644 --- a/src/states_screens/online/networking_lobby.cpp +++ b/src/states_screens/online/networking_lobby.cpp @@ -441,11 +441,11 @@ void NetworkingLobby::onResize() (m_header->m_w >= header_text_width && m_header->getScrollSpeed() != 0.0f)) { m_header->getIrrlichtElement()->remove(); - GUIEngine::getGUIEnv()->setChildEnd(m_back_widget->getIrrlichtElement()); + GUIEngine::getGUIEnv()->getRootGUIElement()->setChildEnd(m_back_widget->getIrrlichtElement()); m_header->setScrollSpeed(m_header->m_w < header_text_width ? 0.5f: 0.0f); m_header->add(); m_header->setText(m_header_text, true); - GUIEngine::getGUIEnv()->setChildEnd(NULL); + GUIEngine::getGUIEnv()->getRootGUIElement()->setChildEnd(NULL); } m_header_text_width = header_text_width; } // onResize