]> git.lizzy.rs Git - minetest.git/commitdiff
Fix warnings in guiButton.h
authorsfan5 <sfan5@live.de>
Sat, 5 Oct 2019 15:13:50 +0000 (17:13 +0200)
committersfan5 <sfan5@live.de>
Sat, 5 Oct 2019 16:15:26 +0000 (18:15 +0200)
src/gui/guiButton.h

index b6b0c126c0bcbfbcef4eaa4091b04ad65589e112..63e29ccfcf7b72c6a61b73fea2a0d1b32e4041ee 100644 (file)
@@ -76,19 +76,19 @@ class GUIButton : public gui::IGUIButton
        virtual ~GUIButton();\r
 \r
        //! called if an event happened.\r
-       virtual bool OnEvent(const SEvent& event);\r
+       virtual bool OnEvent(const SEvent& event) override;\r
 \r
        //! draws the element and its children\r
-       virtual void draw();\r
+       virtual void draw() override;\r
 \r
        //! sets another skin independent font. if this is set to zero, the button uses the font of the skin.\r
-       virtual void setOverrideFont(gui::IGUIFont* font=0);\r
+       virtual void setOverrideFont(gui::IGUIFont* font=0) override;\r
 \r
        //! Gets the override font (if any)\r
-       virtual gui::IGUIFont* getOverrideFont() const;\r
+       virtual gui::IGUIFont* getOverrideFont() const override;\r
 \r
        //! Get the font which is used right now for drawing\r
-       virtual gui::IGUIFont* getActiveFont() const;\r
+       virtual gui::IGUIFont* getActiveFont() const override;\r
 \r
        //! Sets another color for the button text.\r
        virtual void setOverrideColor(video::SColor color);\r
@@ -103,34 +103,36 @@ class GUIButton : public gui::IGUIButton
        virtual bool isOverrideColorEnabled(void) const;\r
 \r
        //! Sets an image which should be displayed on the button when it is in the given state.\r
-       virtual void setImage(gui::EGUI_BUTTON_IMAGE_STATE state, video::ITexture* image=0, const core::rect<s32>& sourceRect=core::rect<s32>(0,0,0,0));\r
+       virtual void setImage(gui::EGUI_BUTTON_IMAGE_STATE state,\r
+                       video::ITexture* image=0,\r
+                       const core::rect<s32>& sourceRect=core::rect<s32>(0,0,0,0));\r
 \r
        //! Sets an image which should be displayed on the button when it is in normal state.\r
-       virtual void setImage(video::ITexture* image=0)\r
+       virtual void setImage(video::ITexture* image=0) override\r
        {\r
                setImage(gui::EGBIS_IMAGE_UP, image);\r
        }\r
 \r
        //! Sets an image which should be displayed on the button when it is in normal state.\r
-       virtual void setImage(video::ITexture* image, const core::rect<s32>& pos)\r
+       virtual void setImage(video::ITexture* image, const core::rect<s32>& pos) override\r
        {\r
                setImage(gui::EGBIS_IMAGE_UP, image, pos);\r
        }\r
 \r
        //! Sets an image which should be displayed on the button when it is in pressed state.\r
-       virtual void setPressedImage(video::ITexture* image=0)\r
+       virtual void setPressedImage(video::ITexture* image=0) override\r
        {\r
                setImage(gui::EGBIS_IMAGE_DOWN, image);\r
        }\r
 \r
        //! Sets an image which should be displayed on the button when it is in pressed state.\r
-       virtual void setPressedImage(video::ITexture* image, const core::rect<s32>& pos)\r
+       virtual void setPressedImage(video::ITexture* image, const core::rect<s32>& pos) override\r
        {\r
                setImage(gui::EGBIS_IMAGE_DOWN, image, pos);\r
        }\r
 \r
        //! Sets the sprite bank used by the button\r
-       virtual void setSpriteBank(gui::IGUISpriteBank* bank=0);\r
+       virtual void setSpriteBank(gui::IGUISpriteBank* bank=0) override;\r
 \r
        //! Sets the animated sprite for a specific button state\r
        /** \param index: Number of the sprite within the sprite bank, use -1 for no sprite\r
@@ -163,34 +165,34 @@ class GUIButton : public gui::IGUIButton
        //! Sets if the button should behave like a push button. Which means it\r
        //! can be in two states: Normal or Pressed. With a click on the button,\r
        //! the user can change the state of the button.\r
-       virtual void setIsPushButton(bool isPushButton=true);\r
+       virtual void setIsPushButton(bool isPushButton=true) override;\r
 \r
        //! Checks whether the button is a push button\r
-       virtual bool isPushButton() const;\r
+       virtual bool isPushButton() const override;\r
 \r
        //! Sets the pressed state of the button if this is a pushbutton\r
-       virtual void setPressed(bool pressed=true);\r
+       virtual void setPressed(bool pressed=true) override;\r
 \r
        //! Returns if the button is currently pressed\r
-       virtual bool isPressed() const;\r
+       virtual bool isPressed() const override;\r
 \r
        //! Sets if the button should use the skin to draw its border\r
-       virtual void setDrawBorder(bool border=true);\r
+       virtual void setDrawBorder(bool border=true) override;\r
 \r
        //! Checks if the button face and border are being drawn\r
-       virtual bool isDrawingBorder() const;\r
+       virtual bool isDrawingBorder() const override;\r
 \r
        //! Sets if the alpha channel should be used for drawing images on the button (default is false)\r
-       virtual void setUseAlphaChannel(bool useAlphaChannel=true);\r
+       virtual void setUseAlphaChannel(bool useAlphaChannel=true) override;\r
 \r
        //! Checks if the alpha channel should be used for drawing images on the button\r
-       virtual bool isAlphaChannelUsed() const;\r
+       virtual bool isAlphaChannelUsed() const override;\r
 \r
        //! Sets if the button should scale the button images to fit\r
-       virtual void setScaleImage(bool scaleImage=true);\r
+       virtual void setScaleImage(bool scaleImage=true) override;\r
 \r
        //! Checks whether the button scales the used images\r
-       virtual bool isScalingImage() const;\r
+       virtual bool isScalingImage() const override;\r
 \r
        //! Get if the shift key was pressed in last EGET_BUTTON_CLICKED event\r
        virtual bool getClickShiftState() const\r
@@ -205,10 +207,10 @@ class GUIButton : public gui::IGUIButton
        }\r
 \r
        //! Writes attributes of the element.\r
-       virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;\r
+       virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const override;\r
 \r
        //! Reads attributes of the element\r
-       virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);\r
+       virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) override;\r
 \r
 \r
 \r