]> git.lizzy.rs Git - minetest.git/commitdiff
Fix Irrlicht 1.9 support
authorsfan5 <sfan5@live.de>
Fri, 6 Sep 2019 16:29:29 +0000 (18:29 +0200)
committersfan5 <sfan5@live.de>
Fri, 6 Sep 2019 16:29:29 +0000 (18:29 +0200)
src/gui/guiButton.h

index 04c24d40e4c80fca6d46a9a172b1b90d56892ed1..b6b0c126c0bcbfbcef4eaa4091b04ad65589e112 100644 (file)
@@ -14,7 +14,7 @@
 \r
 using namespace irr;\r
 \r
-#if (IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR != 8 || IRRLICHT_VERSION_REVISION < 5)\r
+#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 8)\r
        namespace irr { namespace gui {\r
 \r
                //! State of buttons used for drawing texture images.\r
@@ -142,9 +142,11 @@ class GUIButton : public gui::IGUIButton
                                                   video::SColor color=video::SColor(255,255,255,255),\r
                                                   bool loop=false, bool scale=false);\r
 \r
+#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 8)\r
        void setSprite(gui::EGUI_BUTTON_STATE state, s32 index, video::SColor color, bool loop) override {\r
                setSprite(state, index, color, loop, false);\r
        }\r
+#endif\r
 \r
        //! Get the sprite-index for the given state or -1 when no sprite is set\r
        virtual s32 getSpriteIndex(gui::EGUI_BUTTON_STATE state) const;\r