Skip to content

Commit dde0628

Browse files
committed
Fix warnings in guiButton.h
1 parent ad96df1 commit dde0628

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

src/gui/guiButton.h

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ class GUIButton : public gui::IGUIButton
7676
virtual ~GUIButton();
7777

7878
//! called if an event happened.
79-
virtual bool OnEvent(const SEvent& event);
79+
virtual bool OnEvent(const SEvent& event) override;
8080

8181
//! draws the element and its children
82-
virtual void draw();
82+
virtual void draw() override;
8383

8484
//! sets another skin independent font. if this is set to zero, the button uses the font of the skin.
85-
virtual void setOverrideFont(gui::IGUIFont* font=0);
85+
virtual void setOverrideFont(gui::IGUIFont* font=0) override;
8686

8787
//! Gets the override font (if any)
88-
virtual gui::IGUIFont* getOverrideFont() const;
88+
virtual gui::IGUIFont* getOverrideFont() const override;
8989

9090
//! Get the font which is used right now for drawing
91-
virtual gui::IGUIFont* getActiveFont() const;
91+
virtual gui::IGUIFont* getActiveFont() const override;
9292

9393
//! Sets another color for the button text.
9494
virtual void setOverrideColor(video::SColor color);
@@ -103,34 +103,36 @@ class GUIButton : public gui::IGUIButton
103103
virtual bool isOverrideColorEnabled(void) const;
104104

105105
//! Sets an image which should be displayed on the button when it is in the given state.
106-
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));
106+
virtual void setImage(gui::EGUI_BUTTON_IMAGE_STATE state,
107+
video::ITexture* image=0,
108+
const core::rect<s32>& sourceRect=core::rect<s32>(0,0,0,0));
107109

108110
//! Sets an image which should be displayed on the button when it is in normal state.
109-
virtual void setImage(video::ITexture* image=0)
111+
virtual void setImage(video::ITexture* image=0) override
110112
{
111113
setImage(gui::EGBIS_IMAGE_UP, image);
112114
}
113115

114116
//! Sets an image which should be displayed on the button when it is in normal state.
115-
virtual void setImage(video::ITexture* image, const core::rect<s32>& pos)
117+
virtual void setImage(video::ITexture* image, const core::rect<s32>& pos) override
116118
{
117119
setImage(gui::EGBIS_IMAGE_UP, image, pos);
118120
}
119121

120122
//! Sets an image which should be displayed on the button when it is in pressed state.
121-
virtual void setPressedImage(video::ITexture* image=0)
123+
virtual void setPressedImage(video::ITexture* image=0) override
122124
{
123125
setImage(gui::EGBIS_IMAGE_DOWN, image);
124126
}
125127

126128
//! Sets an image which should be displayed on the button when it is in pressed state.
127-
virtual void setPressedImage(video::ITexture* image, const core::rect<s32>& pos)
129+
virtual void setPressedImage(video::ITexture* image, const core::rect<s32>& pos) override
128130
{
129131
setImage(gui::EGBIS_IMAGE_DOWN, image, pos);
130132
}
131133

132134
//! Sets the sprite bank used by the button
133-
virtual void setSpriteBank(gui::IGUISpriteBank* bank=0);
135+
virtual void setSpriteBank(gui::IGUISpriteBank* bank=0) override;
134136

135137
//! Sets the animated sprite for a specific button state
136138
/** \param index: Number of the sprite within the sprite bank, use -1 for no sprite
@@ -163,34 +165,34 @@ class GUIButton : public gui::IGUIButton
163165
//! Sets if the button should behave like a push button. Which means it
164166
//! can be in two states: Normal or Pressed. With a click on the button,
165167
//! the user can change the state of the button.
166-
virtual void setIsPushButton(bool isPushButton=true);
168+
virtual void setIsPushButton(bool isPushButton=true) override;
167169

168170
//! Checks whether the button is a push button
169-
virtual bool isPushButton() const;
171+
virtual bool isPushButton() const override;
170172

171173
//! Sets the pressed state of the button if this is a pushbutton
172-
virtual void setPressed(bool pressed=true);
174+
virtual void setPressed(bool pressed=true) override;
173175

174176
//! Returns if the button is currently pressed
175-
virtual bool isPressed() const;
177+
virtual bool isPressed() const override;
176178

177179
//! Sets if the button should use the skin to draw its border
178-
virtual void setDrawBorder(bool border=true);
180+
virtual void setDrawBorder(bool border=true) override;
179181

180182
//! Checks if the button face and border are being drawn
181-
virtual bool isDrawingBorder() const;
183+
virtual bool isDrawingBorder() const override;
182184

183185
//! Sets if the alpha channel should be used for drawing images on the button (default is false)
184-
virtual void setUseAlphaChannel(bool useAlphaChannel=true);
186+
virtual void setUseAlphaChannel(bool useAlphaChannel=true) override;
185187

186188
//! Checks if the alpha channel should be used for drawing images on the button
187-
virtual bool isAlphaChannelUsed() const;
189+
virtual bool isAlphaChannelUsed() const override;
188190

189191
//! Sets if the button should scale the button images to fit
190-
virtual void setScaleImage(bool scaleImage=true);
192+
virtual void setScaleImage(bool scaleImage=true) override;
191193

192194
//! Checks whether the button scales the used images
193-
virtual bool isScalingImage() const;
195+
virtual bool isScalingImage() const override;
194196

195197
//! Get if the shift key was pressed in last EGET_BUTTON_CLICKED event
196198
virtual bool getClickShiftState() const
@@ -205,10 +207,10 @@ class GUIButton : public gui::IGUIButton
205207
}
206208

207209
//! Writes attributes of the element.
208-
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;
210+
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const override;
209211

210212
//! Reads attributes of the element
211-
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
213+
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) override;
212214

213215

214216

0 commit comments

Comments
 (0)