diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index a1af220e8a..551faaf547 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -607,14 +607,14 @@ if [ -z $SKIP_DOWNLOAD ]; then "ffmpeg-${FFMPEG_VER}-dev-win${BITS}.zip" # MyGUI - download "MyGUI 3.4.1" \ - "https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" \ - "MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" + download "MyGUI 3.4.2" \ + "https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" \ + "MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" if [ -n "$PDBS" ]; then download "MyGUI symbols" \ - "https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" \ - "MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" + "https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" \ + "MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" fi # OpenAL @@ -778,20 +778,20 @@ printf "FFmpeg ${FFMPEG_VER}... " } cd $DEPS echo -printf "MyGUI 3.4.1... " +printf "MyGUI 3.4.2... " { cd $DEPS_INSTALL if [ -d MyGUI ] && \ grep "MYGUI_VERSION_MAJOR 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \ grep "MYGUI_VERSION_MINOR 4" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \ - grep "MYGUI_VERSION_PATCH 1" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null + grep "MYGUI_VERSION_PATCH 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then rm -rf MyGUI - eval 7z x -y "${DEPS}/MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" $STRIP - [ -n "$PDBS" ] && eval 7z x -y "${DEPS}/MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" $STRIP - mv "MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}" MyGUI + eval 7z x -y "${DEPS}/MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" $STRIP + [ -n "$PDBS" ] && eval 7z x -y "${DEPS}/MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" $STRIP + mv "MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}" MyGUI fi export MYGUI_HOME="$(real_pwd)/MyGUI" for CONFIGURATION in ${CONFIGURATIONS[@]}; do diff --git a/CI/org.openmw.OpenMW.devel.yaml b/CI/org.openmw.OpenMW.devel.yaml index 39889168ca..4a263c6a40 100644 --- a/CI/org.openmw.OpenMW.devel.yaml +++ b/CI/org.openmw.OpenMW.devel.yaml @@ -125,7 +125,7 @@ modules: - "-DMYGUI_BUILD_PLUGINS=0" sources: - type: archive - url: https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.1.tar.gz + url: https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.2.tar.gz sha256: bdf730bdeb4ad89e6b8223967db01aa5274d2b93adc2c0d6aa4842faeed4de1a - name: libunshield diff --git a/CMakeLists.txt b/CMakeLists.txt index db8e946909..6bbbaa4bf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,7 +333,7 @@ endif() # Required for building the FFmpeg headers add_definitions(-D__STDC_CONSTANT_MACROS) -# Reqiuired for unity build +# Required for unity build add_definitions(-DMYGUI_DONT_REPLACE_NULLPTR) # TinyXML @@ -456,7 +456,7 @@ if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.77.0) endif() if(OPENMW_USE_SYSTEM_MYGUI) - find_package(MyGUI 3.4.1 REQUIRED) + find_package(MyGUI 3.4.2 REQUIRED) endif() find_package(SDL2 2.0.9 REQUIRED) find_package(OpenAL REQUIRED) @@ -709,18 +709,6 @@ if (WIN32) 5054 # Deprecated operations between enumerations of different types caused by Qt headers ) - if( "${MyGUI_VERSION}" VERSION_LESS_EQUAL "3.4.0" ) - set(WARNINGS_DISABLE ${WARNINGS_DISABLE} - 4866 # compiler may not enforce left-to-right evaluation order for call - ) - endif() - - if( "${MyGUI_VERSION}" VERSION_LESS_EQUAL "3.4.1" ) - set(WARNINGS_DISABLE ${WARNINGS_DISABLE} - 4275 # non dll-interface class 'MyGUI::delegates::IDelegateUnlink' used as base for dll-interface class 'MyGUI::Widget' - ) - endif() - foreach(d ${WARNINGS_DISABLE}) set(WARNINGS "${WARNINGS} /wd${d}") endforeach(d) diff --git a/apps/openmw/mwgui/bookpage.cpp b/apps/openmw/mwgui/bookpage.cpp index 32bd524305..5d9256b20d 100644 --- a/apps/openmw/mwgui/bookpage.cpp +++ b/apps/openmw/mwgui/bookpage.cpp @@ -769,11 +769,7 @@ namespace MWGui void reset(float left, float top, MyGUI::Colour colour) { -#if MYGUI_VERSION <= MYGUI_DEFINE_VERSION(3, 4, 1) - mC = MyGUI::texture_utility::toColourARGB(colour) | 0xFF000000; -#else mC = MyGUI::texture_utility::toNativeColour(colour, MyGUI::VertexColourType::ColourARGB) | 0xFF000000; -#endif MyGUI::texture_utility::convertColour(mC, mVertexColourType); mCursor.left = mOrigin.left + left; diff --git a/components/lua_ui/widget.cpp b/components/lua_ui/widget.cpp index ff9f4d90a2..17629f453f 100644 --- a/components/lua_ui/widget.cpp +++ b/components/lua_ui/widget.cpp @@ -73,11 +73,7 @@ namespace LuaUi w->eventMouseButtonPressed.clear(); w->eventMouseButtonReleased.clear(); w->eventMouseMove.clear(); -#if MYGUI_VERSION <= MYGUI_DEFINE_VERSION(3, 4, 2) w->eventMouseDrag.m_event.clear(); -#else - w->eventMouseDrag.clear(); -#endif w->eventMouseSetFocus.clear(); w->eventMouseLostFocus.clear(); diff --git a/components/lua_ui/window.cpp b/components/lua_ui/window.cpp index 3ee7336a78..bccd2f5a58 100644 --- a/components/lua_ui/window.cpp +++ b/components/lua_ui/window.cpp @@ -16,11 +16,7 @@ namespace LuaUi for (auto& [w, _] : mActionWidgets) { w->eventMouseButtonPressed.clear(); -#if MYGUI_VERSION <= MYGUI_DEFINE_VERSION(3, 4, 2) w->eventMouseDrag.m_event.clear(); -#else - w->eventMouseDrag.clear(); -#endif } mActionWidgets.clear(); diff --git a/components/widgets/box.cpp b/components/widgets/box.cpp index 4ef2e94d48..e9246f32cd 100644 --- a/components/widgets/box.cpp +++ b/components/widgets/box.cpp @@ -5,25 +5,6 @@ namespace Gui { - // TODO: Since 3.4.2 MyGUI is supposed to automatically translate tags - // If the 3.4.2 become a required minimum version, the ComboBox class may be removed. - void ComboBox::setPropertyOverride(const std::string& _key, const std::string& _value) - { -#if MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3, 4, 2) - MyGUI::ComboBox::setPropertyOverride(_key, _value); -#else - if (_key == "AddItem") - { - const std::string value = MyGUI::LanguageManager::getInstance().replaceTags(_value); - MyGUI::ComboBox::setPropertyOverride(_key, value); - } - else - { - MyGUI::ComboBox::setPropertyOverride(_key, _value); - } -#endif - } - void AutoSizedWidget::notifySizeChange(MyGUI::Widget* w) { MyGUI::Widget* parent = w->getParent();