From 421835a30ebe46e4712cb2b0fe3787ae8ef0a674 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 24 Sep 2025 18:35:42 +0200 Subject: [PATCH] Formspec: Fix missing CHG:n fields (regression) The GUIScrollBar type was changed in commit 39f2727503. This commit updates a corresponding check in guiFormSpecMenu accordingly. --- src/gui/guiFormSpecMenu.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index 7d38376897..94e3dcb872 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -3871,8 +3871,6 @@ void GUIFormSpecMenu::acceptInput(FormspecQuitMode quitmode) fields[name] = table->checkEvent(); } } else if (s.ftype == f_DropDown) { - // No dynamic cast possible due to some distributions shipped - // without rtti support in Irrlicht IGUIElement *element = getElementFromId(s.fid, true); gui::IGUIComboBox *e = NULL; if ((element) && (element->getType() == gui::EGUIET_COMBO_BOX)) { @@ -3895,8 +3893,6 @@ void GUIFormSpecMenu::acceptInput(FormspecQuitMode quitmode) } } } else if (s.ftype == f_TabHeader) { - // No dynamic cast possible due to some distributions shipped - // without rtti support in Irrlicht IGUIElement *element = getElementFromId(s.fid, true); gui::IGUITabControl *e = nullptr; if ((element) && (element->getType() == gui::EGUIET_TAB_CONTROL)) { @@ -3907,8 +3903,6 @@ void GUIFormSpecMenu::acceptInput(FormspecQuitMode quitmode) fields[name] = itos(e->getActiveTab() + 1); } } else if (s.ftype == f_CheckBox) { - // No dynamic cast possible due to some distributions shipped - // without rtti support in Irrlicht IGUIElement *element = getElementFromId(s.fid, true); gui::IGUICheckBox *e = nullptr; if ((element) && (element->getType() == gui::EGUIET_CHECK_BOX)) { @@ -3922,11 +3916,9 @@ void GUIFormSpecMenu::acceptInput(FormspecQuitMode quitmode) fields[name] = "false"; } } else if (s.ftype == f_ScrollBar) { - // No dynamic cast possible due to some distributions shipped - // without rtti support in Irrlicht IGUIElement *element = getElementFromId(s.fid, true); GUIScrollBar *e = nullptr; - if (element && element->getType() == gui::EGUIET_ELEMENT) + if (element && element->getType() == gui::EGUIET_SCROLL_BAR) e = static_cast(element); if (e) { @@ -3936,8 +3928,6 @@ void GUIFormSpecMenu::acceptInput(FormspecQuitMode quitmode) fields[name] = "VAL:" + itos(e->getPos()); } } else if (s.ftype == f_AnimatedImage) { - // No dynamic cast possible due to some distributions shipped - // without rtti support in Irrlicht IGUIElement *element = getElementFromId(s.fid, true); GUIAnimatedImage *e = nullptr; if (element && element->getType() == gui::EGUIET_ELEMENT)