Remove an unneeded method

This commit is contained in:
CodingJellyfish 2024-04-29 10:06:47 +08:00
parent e64e2d8cd5
commit 5ff449d6c9
4 changed files with 4 additions and 8 deletions

View File

@ -612,8 +612,6 @@ public:
virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node) =0; virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node) =0;
virtual void removeHovered(IGUIElement* element) = 0; virtual void removeHovered(IGUIElement* element) = 0;
virtual bool setChildEnd(IGUIElement* end) = 0;
}; };

View File

@ -257,8 +257,6 @@ public:
virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node); virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node);
virtual void removeHovered(IGUIElement* element); virtual void removeHovered(IGUIElement* element);
virtual bool setChildEnd(IGUIElement* end) { return IGUIElement::setChildEnd(end); }
private: private:
IGUIElement* getNextElement(bool reverse=false, bool group=false); IGUIElement* getNextElement(bool reverse=false, bool group=false);

View File

@ -197,11 +197,11 @@ void DynamicRibbonWidget::resize()
for (unsigned i = 0; i < MAX_PLAYER_COUNT; i++) for (unsigned i = 0; i < MAX_PLAYER_COUNT; i++)
selected[i] = getSelectionIDString(i); selected[i] = getSelectionIDString(i);
Widget::resize(); Widget::resize();
GUIEngine::getGUIEnv()->setChildEnd(m_left_widget->m_element); GUIEngine::getGUIEnv()->getRootGUIElement()->setChildEnd(m_left_widget->m_element);
updateForResizing(); updateForResizing();
buildInternalStructure(); buildInternalStructure();
updateItemDisplay(); updateItemDisplay();
GUIEngine::getGUIEnv()->setChildEnd(NULL); GUIEngine::getGUIEnv()->getRootGUIElement()->setChildEnd(NULL);
for (unsigned i = 0; i < MAX_PLAYER_COUNT; i++) for (unsigned i = 0; i < MAX_PLAYER_COUNT; i++)
{ {
if (!selected[i].empty()) if (!selected[i].empty())

View File

@ -441,11 +441,11 @@ void NetworkingLobby::onResize()
(m_header->m_w >= header_text_width && m_header->getScrollSpeed() != 0.0f)) (m_header->m_w >= header_text_width && m_header->getScrollSpeed() != 0.0f))
{ {
m_header->getIrrlichtElement()->remove(); 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->setScrollSpeed(m_header->m_w < header_text_width ? 0.5f: 0.0f);
m_header->add(); m_header->add();
m_header->setText(m_header_text, true); m_header->setText(m_header_text, true);
GUIEngine::getGUIEnv()->setChildEnd(NULL); GUIEngine::getGUIEnv()->getRootGUIElement()->setChildEnd(NULL);
} }
m_header_text_width = header_text_width; m_header_text_width = header_text_width;
} // onResize } // onResize