Fix warnings in guiButton.h

master
sfan5 2019-10-05 17:13:50 +02:00
parent ad96df191b
commit dde0628976
1 changed files with 25 additions and 23 deletions

View File

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